mobx-keystone
Version:
A MobX powered state management solution based on data trees with first class support for TypeScript, snapshots, patches and much more
10 lines (9 loc) • 392 B
TypeScript
import { Patch } from '../patch/Patch';
/**
* Applies the given patches to the given target object.
*
* @param node Target object.
* @param patches List of patches to apply.
* @param reverse Whether patches are applied in reverse order.
*/
export declare function applyPatches(node: object, patches: ReadonlyArray<Patch> | ReadonlyArray<ReadonlyArray<Patch>>, reverse?: boolean): void;