/** * Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal */ import { State } from '../state.js'; import { StateTransform } from '../transform.js'; import { StateObject, StateObjectCell } from '../object.js'; export { StateTreeSpine }; /** The tree spine allows access to ancestor of a node during reconciliation. */ interface StateTreeSpine { getAncestorOfType(type: T): StateObject.From | undefined; getRootOfType(type: T): StateObject.From | undefined; } declare namespace StateTreeSpine { class Impl implements StateTreeSpine { private cells; private _current; get current(): StateObjectCell | undefined; set current(cell: StateObjectCell | undefined); getAncestorOfType(t: T): StateObject.From | undefined; getRootOfType(t: T): StateObject.From | undefined; constructor(cells: State.Cells); } function getDecoratorChain(state: State, currentRef: StateTransform.Ref): StateObjectCell[]; function getRootOfType(state: State, t: T, ref: string): StateObject.From | undefined; }