import type { Force } from '../cast/index.js'; import type { Merge, Value } from '../object/index.js'; import type { AlsoAccept } from '../type/index.js'; import type { ArraySetUpdateIt } from './arraySetUpdateIt.js'; import type { DeleteIt } from './deleteIt.js'; import type { IncrementIt } from './incrementIt.js'; import type { KeepIt } from './keepIt.js'; import type { PatchFor } from './PatchFor.js'; import type { ReplaceIt } from './replaceIt.js'; export type ForcePatchFor = (X extends object ? { [key in keyof X]?: ForcePatchFor; } : never) | ReplaceIt> | ArraySetUpdateIt | DeleteIt | X | AlsoAccept; type ApplyPatchSub = { [key in keyof P]: ApplyPatch, P[key]>; }; export type ApplyPatch> = P extends DeleteIt ? undefined : P extends ReplaceIt ? R : P extends KeepIt ? X : P extends IncrementIt ? X extends bigint ? bigint : Amount extends bigint ? bigint : number : P extends object ? X extends object ? Merge> : ApplyPatchSub : P; export interface PatchOptions { /** * Recursion max depth * * - Depth `0` is like assignment * - Depth `1` is like React's state `.update()` for class components * * @defaultValue `Infinity` */ depth: number; } export declare const defaultPatchOptions: { depth: number; }; export declare function forcePatch>(x: X, patchValue: PatchValue, options?: PatchOptions): ApplyPatch; export declare function patch>(x: X, patchValue: PatchValue, options?: PatchOptions): Force>; export {}; //# sourceMappingURL=patch.d.ts.map