UNPKG

mobx-bonsai

Version:

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

11 lines (10 loc) 506 B
import { Path } from './pathTypes'; /** * Gets the path to get from a parent to a given child. * Returns an empty array if the child is actually the given parent or undefined if the child is not a child of the parent. * * @param fromParent The parent node. * @param toChild The child node. * @returns The path from the parent to the child or undefined if the child is not a child of the parent. */ export declare function getParentToChildPath(fromParent: object, toChild: object): Path | undefined;