interface INodeConfig { id: string; type: 'node' | 'group'; index?: number; instance: any; parent: WidgetNode | null; children: WidgetNode[]; } export declare class WidgetNode { id: string; instance: any; parent: WidgetNode | null; type: 'node' | 'group'; index?: number; children: WidgetNode[]; constructor(config: INodeConfig); get value(): any; get isChildrenVisible(): any; /** * 获取 parents */ get parents(): any[]; get firstChild(): WidgetNode; get lastChild(): WidgetNode; getSibling(lastProp: string): WidgetNode | undefined; getSiblings(): WidgetNode[]; /** * 是否是叶子节点 */ get isLeaf(): boolean; appendChild(node: WidgetNode): WidgetNode[] | (WidgetNode & any[]); removeChild(node: WidgetNode): WidgetNode[] | (WidgetNode & any[]); } export declare class WidgetTree { widgetMap: Record; addWidgetNode(path: string, instance: any, type: 'node' | 'group', index?: number): void; removeWidgetNode(path: string, instance: any): void; } export {};