/** * Generic tree building utilities used by ModuleRepository and FlowRepository. */ /** * Node with parent reference and children array */ export interface TreeNode { id: number; parentId: number | null; } /** * Build a tree structure from a flat list of nodes with parent references. * @returns The root node(s) with children attached */ export declare function buildTree(nodes: T[], createNode: (node: T) => R): R[]; /** * Build a single-root tree structure from a flat list of nodes. * @returns The root node or null if no nodes */ export declare function buildSingleRootTree(nodes: T[], createNode: (node: T) => R): R | null; //# sourceMappingURL=tree-builder.d.ts.map