import type { TableNode, TableRecord } from '../types'; export interface Config { id: keyof Item; parentId: keyof Item; } type TableNodePartial = Partial; /** * Unflattens an array to a tree with runtime O(n) */ export declare function arrayToTree(items: readonly TData[], config: Config): TableNode[]; /** * Returns the number of nodes in a tree in a recursive way * @param tree An array of nodes (tree items), each having a field `childrenField` that contains an array of nodes * @returns Number of nodes in the tree */ export declare function countNodes(tree: TableNodePartial[]): number; export {};