import { IDisposable } from '../util'; import { IObservableCache } from './IObservableCache'; import { ISourceUpdater } from './ISourceUpdater'; /** * Node describing the relationship between and item and it's ancestors and descendent * @typeparam TObject The type of the object * @typeparam TKey The type of the key */ export declare class Node implements IDisposable { private readonly _children; private readonly _cleanUp; private _parent?; /** * Initializes a new instance of the class. * @param item The item * @param key The key * @param parent The parent */ constructor(item: TObject, key: TKey, parent?: Node); /** * The item */ readonly item: TObject; /** * The key */ readonly key: TKey; /** * Gets the parent if it has one */ get parent(): Node | undefined; /** * The child nodes */ readonly children: IObservableCache, TKey>; /** * Gets or sets a value indicating whether this instance is root. */ get isRoot(): boolean; /** * Gets the depth i.e. how many degrees of separation from the parent */ get depth(): number; /** * @internal */ update(updateAction: (updater: ISourceUpdater, TKey>) => void): void; /** * @internal */ setParent(parent?: Node | undefined): void; toString(): string; dispose(): void; }