import { NormalObject, TreeNode } from '@vunk/core/shared/types'; interface ListItem { id?: string | number; pId?: string | number; [key: string]: any; } declare function isTop(item: ListItem, key?: { id: string; pId: string; }): boolean; /** * [{id:1, pid:0},{id: 2, pid:0}, {id: 0}] => * [{id: 0, children: [{id:1}, {id:2}]}] * */ export declare const listToTree: (data: T[], key?: { id?: string; pId?: string; children?: C; }, fn?: typeof isTop) => TreeNode[]; export {};