UNPKG

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) 331 B
/** * Detaches a given object from a tree. * If the parent is an object / model, detaching will delete the property. * If the parent is an array detaching will remove the node by splicing it. * If there's no parent it will throw. * * @param node Object to be detached. */ export declare function detach(node: object): void;