/** Accepts any kind of object. */ export declare type AnyObject = { [key: string]: any; }; /** Accepts any kind of array. */ export declare type AnyArray = any[]; /** The type of values for the given array type. */ export declare type ArrayValue = T extends Array ? V : never; /** A splice operation on the given array type. */ export declare type ArraySplice = [number, number, ...PlainArray]; /** A plain object version of another object type. (Strips inheritance, etc.) */ export declare type PlainObject = { [K in keyof T]: T[K]; }; /** A plain array version of another array type. */ export declare type PlainArray = ArrayValue[]; /** Type of property removals in `ObjectPatch`. */ export declare type ObjectPatchRemove = (keyof T)[]; /** Type of property sets in `ObjectPatch`. */ export declare type ObjectPatchSet = Partial>; /** Type of property patches in `ObjectPatch`. */ export declare type ObjectPatchNested = { [K in keyof T]?: TypedPatch; }; /** Patch operation on an object. */ /** The property order here matches the order in which the patch is applied. */ export interface ObjectPatch { /** Type indicator. */ t: "o"; /** Properties to remove. */ r?: ObjectPatchRemove; /** Properties to set. */ s?: ObjectPatchSet; /** Properties to patch. */ p?: ObjectPatchNested; } /** Type of item patches in `ArrayPatch`. */ export declare type ArrayPatchNested = { [idx: number]: TypedPatch>; }; /** Type of splices in `ArrayPatch`. */ export declare type ArrayPatchSplice = ArraySplice[]; /** Patch operation on an array. */ /** The property order here matches the order in which the patch is applied. */ export interface ArrayPatch { /** Type indicator. */ t: "a"; /** Items to patch. */ p?: ArrayPatchNested; /** Splices to apply. */ s?: ArrayPatchSplice; } /** Patch operation on a value. */ export declare type Patch = ObjectPatch | ArrayPatch; /** Typed patch operation on a value. */ export declare type TypedPatch = ObjectPatch | ArrayPatch; /** Special kind of 'outer' patch values. */ export declare type OuterPatchValue = "none" | "reset"; /** Patch operation on an object, including outer results. */ export declare type OuterObjectPatch = OuterPatchValue | ObjectPatch; /** Patch operation on an array, including outer results. */ export declare type OuterArrayPatch = OuterPatchValue | ArrayPatch; /** Patch operation on a value, including outer results. */ export declare type OuterPatch = OuterPatchValue | Patch; /** Typed patch operation on a value, including outer results. */ export declare type TypedOuterPatch = OuterPatchValue | TypedPatch;