import { NodeFactory } from './NodeFactory.js'; export type Property = string | number | boolean; export type PropertyList = { [key: string]: Property; }; export interface Node, C extends NodeClass> { readonly kind: string; readonly factory: NodeFactory; parent: N; childNodes: N[]; setProperty(name: string, value: Property): void; getProperty(name: string): Property; getPropertyNames(): string[]; getAllProperties(): PropertyList; removeProperty(...names: string[]): void; isKind(kind: string): boolean; setChildren(children: N[]): void; appendChild(child: N): N; replaceChild(newChild: N, oldChild: N): N; removeChild(child: N): N; childIndex(child: N): number; copy(): N; findNodes(kind: string): N[]; walkTree(func: (node: N, data?: any) => void, data?: any): void; } export interface NodeClass, C extends NodeClass> { new (factory: NodeFactory, properties?: PropertyList, children?: N[]): N; } export declare abstract class AbstractNode, C extends NodeClass> implements Node { readonly factory: NodeFactory; parent: N; protected properties: PropertyList; childNodes: N[]; constructor(factory: NodeFactory, properties?: PropertyList, children?: N[]); get kind(): string; setProperty(name: string, value: Property): void; getProperty(name: string): Property; getPropertyNames(): string[]; getAllProperties(): PropertyList; removeProperty(...names: string[]): void; isKind(kind: string): boolean; setChildren(children: N[]): void; appendChild(child: N): N; replaceChild(newChild: N, oldChild: N): N; removeChild(child: N): N; childIndex(node: N): number; copy(): N; findNodes(kind: string): N[]; walkTree(func: (node: N, data?: any) => void, data?: any): any; toString(): string; } export declare abstract class AbstractEmptyNode, C extends NodeClass> extends AbstractNode { setChildren(_children: N[]): void; appendChild(child: N): N; replaceChild(_newChild: N, oldChild: N): N; childIndex(_node: N): number; walkTree(func: (node: N, data?: any) => void, data?: any): any; toString(): string; }