/** Rewritings that return the very object they were given wherever they change nothing, so that an immer draft is left untouched there. */ /** The items that do not match, or the very same array when none does, so that a draft stays untouched. */ export declare const without: (items: T[], matches: (item: T) => boolean) => T[]; /** * The items each changed, or the very same array when the change left * every one as it was. The array is copied at the first item that * changes, so that one left as it was costs no copy. */ export declare const mapped: (items: T[], change: (item: T) => T) => T[]; /** The items each changed, less those the change emptied; the very same array where it changed none. */ export declare const pruned: (items: T[], change: (item: T) => T, emptied: (item: T) => boolean) => T[]; /** The record with the field replaced, or the very same record where that is what stood there. */ export declare const replacing: (record: T, key: K, value: T[K]) => T; /** A record of the edition, as the walk over it sees one. */ export type Node = Record; export declare const isRecord: (value: unknown) => value is Node; /** The record's values each changed, or the very same record where the change left every one as it was, copied as `mapped` copies. */ export declare const withValues: (record: Node, change: (value: unknown) => unknown) => Node; /** The value with the change applied to every record within it and then to itself, innermost first. */ export declare const deeply: (change: (record: object) => object) => (value: unknown) => unknown; /** Writes onto the draft what the rewriting changed, as deep as the change reaches. */ export declare const writeInto: (draft: Node, before: Node, after: Node) => void;