UNPKG

mobx-bonsai

Version:

A fast lightweight alternative to MobX-State-Tree + Y.js two-way binding

14 lines (13 loc) 457 B
export declare const invalidateSnapshotTreeToRoot: (node: object) => void; /** * Returns a stable snapshot of a node. * * This function computes and caches a snapshot of the given node. * It preserves referential integrity by reusing snapshots for unchanged sub-parts. * * If not a node it will throw. * * @param node - The node to snapshot. * @returns A snapshot of the node. */ export declare function getSnapshot<T extends object>(node: T): T;