/** 扁平列表 → 树（parentId） */
export declare function deepTree<T extends {
    id?: number | string;
    parentId?: number | string | null;
    children?: T[];
    orderNum?: number;
}>(list: T[], sort?: 'asc' | 'desc'): T[];
/** 树 → 扁平（带 depth / hasChildren），按 expanded 展开 */
export declare function flattenTree<T extends {
    id: number | string;
    children?: T[];
}>(nodes: T[], expanded: Set<string | number>, depth?: number, out?: Array<T & {
    depth: number;
    hasChildren: boolean;
}>): Array<T & {
    depth: number;
    hasChildren: boolean;
}>;
