export declare const HashMapPatchSym: unique symbol; export type HashMapPatchSym = typeof HashMapPatchSym; export declare const HashMapPatchKeySym: unique symbol; export type HashMapPatchKeySym = typeof HashMapPatchKeySym; export declare const HashMapPatchValueSym: unique symbol; export type HashMapPatchValueSym = typeof HashMapPatchValueSym; export declare const HashMapPatchPatchSym: unique symbol; export type HashMapPatchPatchSym = typeof HashMapPatchPatchSym; /** * A patch which describes updates to a map of keys and values. * * @tsplus type Differ.HashMap.Patch */ export interface HashMapPatch { readonly [HashMapPatchSym]: HashMapPatchSym; readonly [HashMapPatchKeySym]: (_: Key) => Key; readonly [HashMapPatchValueSym]: (_: Value) => Value; readonly [HashMapPatchPatchSym]: (_: Patch) => Patch; } /** * @tsplus type Differ.HashMap.Patch.Ops */ export interface HashMapPatchOps { readonly $: HashMapPatchAspects; } /** * @tsplus static Differ.Ops HashMap * @tsplus location "@tsplus/stdlib/collections/HashMap/patch/definition" */ export declare const HashMapPatch: HashMapPatchOps; /** * @tsplus type Differ.HashMap.Patch.Aspects */ export interface HashMapPatchAspects { } /** * @tsplus unify Differ.HashMap.Patch */ export declare function unifyHashMapPatch>(self: X): HashMapPatch<[ X ] extends [{ [HashMapPatchKeySym]: (_: infer Key) => infer Key; }] ? Key : never, [ X ] extends [{ [HashMapPatchValueSym]: (_: infer Value) => infer Value; }] ? Value : never, [ X ] extends [{ [HashMapPatchPatchSym]: (_: infer Patch) => infer Patch; }] ? Patch : never>; export declare abstract class BaseHashMapPatch implements HashMapPatch { readonly [HashMapPatchSym]: HashMapPatchSym; readonly [HashMapPatchKeySym]: (_: Key) => Key; readonly [HashMapPatchValueSym]: (_: Value) => Value; readonly [HashMapPatchPatchSym]: (_: Patch) => Patch; } export declare class AddHashMapPatch extends BaseHashMapPatch { readonly key: Key; readonly value: Value; readonly _tag = "Add"; constructor(key: Key, value: Value); } export declare class RemoveHashMapPatch extends BaseHashMapPatch { readonly key: Key; readonly _tag = "Remove"; constructor(key: Key); } export declare class UpdateHashMapPatch extends BaseHashMapPatch { readonly key: Key; readonly patch: Patch; readonly _tag = "Update"; constructor(key: Key, patch: Patch); } export declare class EmptyHashMapPatch extends BaseHashMapPatch { readonly _tag = "Empty"; } export declare class AndThenHashMapPatch extends BaseHashMapPatch { readonly first: HashMapPatch; readonly second: HashMapPatch; readonly _tag = "AndThen"; constructor(first: HashMapPatch, second: HashMapPatch); } export type HashMapPatchInstruction = AddHashMapPatch | RemoveHashMapPatch | UpdateHashMapPatch | EmptyHashMapPatch | AndThenHashMapPatch; /** * @tsplus macro identity */ export declare function hashMapPatchInstruction(self: HashMapPatch): HashMapPatchInstruction; //# sourceMappingURL=definition.d.ts.map