UNPKG

woltlab-compiler

Version:

A compiler for WoltLab-Package Archives and WoltLab-Package Components

84 lines (83 loc) 1.84 kB
import { INode } from "./Generic/INode"; import { INodeOptions } from "./INodeOptions"; import { NodeItem } from "./NodeItem"; /** * Represents a node. */ export declare class Node<T extends NodeItem, TOptions> implements INode<T> { /** * The id of the node. */ private id; /** * The name of the node. */ private name; /** * The item of the node. */ private item; /** * The parent of the node. */ private parent; /** * The children of the node. */ private nodes; /** * Initializes a new instance of the `Node` class. * * @param options * The options for generating the object. * * @param generator * The generator-function for generating sub-nodes. */ constructor(options: INodeOptions<TOptions>, generator: (node: Node<T, TOptions>, options: TOptions) => T); /** * Gets the parents of the node. */ protected readonly Parents: Array<Node<T, TOptions>>; /** * Gets or sets the id of the node. */ ID: string; /** * Gets or sets the name of the node. */ Name: string; /** * Gets the full name of the node. */ readonly FullName: string; /** * @inheritdoc */ readonly Item: T; /** * @inheritdoc */ /** * @inheritdoc */ Parent: Node<T, TOptions>; /** * @inheritdoc */ readonly Nodes: Array<Node<T, TOptions>>; /** * @inheritdoc */ GetAllNodes(): Array<Node<T, TOptions>>; /** * @inheritdoc */ GetObjects(): { [id: string]: any; }; /** * Returns a string that represents the current object. */ toString(): string; }