mobx-bonsai
Version:
A fast lightweight alternative to MobX-State-Tree + Y.js two-way binding
12 lines (11 loc) • 368 B
TypeScript
import { RootPath } from './RootPath';
/**
* Returns the root of the target plus the path from the root to get to the target.
*
* Note that this function will throw if the passed object is not a node.
*
* @template T Root object type.
* @param node Target object.
* @returns
*/
export declare function getRootPath<T extends object>(node: object): RootPath<T>;