export type SimpleTreeOptions = { idAccessor?: string | ((d: T) => string); childrenAccessor?: string | ((d: T) => readonly T[] | null | undefined); }; type Accessors = { getId: (data: T) => string; getChildren: (data: T) => readonly T[] | null | undefined; childrenKey: string; }; export declare class SimpleTree { root: SimpleNode; private accessors; constructor(data: T[], options?: SimpleTreeOptions); get data(): T[]; create(args: { parentId: string | null; index: number; data: T; }): null | undefined; move(args: { id: string; parentId: string | null; index: number; }): void; update(args: { id: string; changes: Partial; }): void; drop(args: { id: string; }): void; find(id: string, node?: SimpleNode): SimpleNode | null; } declare class SimpleNode { data: T; parent: SimpleNode | null; private accessors; id: string; children?: SimpleNode[]; constructor(data: T, parent: SimpleNode | null, accessors: Accessors, id?: string); hasParent(): this is this & { parent: SimpleNode; }; get childIndex(): number; addChild(data: T, index: number): void; removeChild(index: number): void; update(changes: Partial): void; drop(): void; } export {};