import { Mutation } from '../mutator-record/mutations.js'; import type { Path, PathValue } from '../nested/index.js'; /** Generate mutation handlers for a given record of objects */ export declare function mutationFactory>(entityMap: Partial>, mutationMap: Partial>>, localStorageKey?: string | false, maxNumberRecords?: number): { /** Adds a new item to the record of tracked items and creates a new mutation tracking instance */ add: (item: T) => void; delete: (uid: T["uid"] | null | undefined) => void; /** Destructive, overwrites a record to a new item and creates a new mutation tracking instance */ set: (item: T) => void; /** Update a nested property and track the mutation */ edit:

>(uid: T["uid"] | null | undefined, path: P, value: PathValue) => void; /** Commit an untracked edit to the object (undo/redo will not work) */ untrackedEdit:

>(uid: T["uid"], path: P, value: PathValue) => void; /** Undo the last mutation */ undo: (uid: T["uid"]) => void; /** Redo a mutation if available */ redo: (uid: T["uid"]) => void; /** Destructive, clears the record */ reset: () => void; }; export type Mutators = ReturnType>; //# sourceMappingURL=handlers.d.ts.map