import { Runtime } from './runtime'; /** * Hierarchy container. */ export declare class Node = Record, ParentValue extends Record = Record, ChildValue extends Record = Record> { parentNode: Node, Value>; children: Node>[]; index: number; value: Partial; type: string; constructor(value?: Partial, type?: string); /** * Apply specified transform to current value. Mount the node * to replace the original one in the tree and then return it. */ map(transform?: (x: Value) => Value): this; /** * Set or get the specified attribute. It the value is specified, update * the attribute of current value and return the node. Otherwise * return the the attribute of current value. */ attr(key: keyof Value, value?: T): T extends undefined ? T : this; /** * Create a new node and append to children nodes. */ append(Ctor: new (value: Record) => Node): Node; push(node: Node): this; /** * Remove current node from parentNode. */ remove(): Node; getNodeByKey(key: string): Node; getNodesByType(type: string): Node[]; getNodeByType(type: string): Node; /** * Apply specified callback to the node value. */ call(callback: (node: this, ...params: any[]) => any, ...params: any[]): this; getRoot(): Runtime; }