interface TreeHelperConfig { id: string; children: string; pid: string; } declare interface Fn { (...arg: T[]): R; } export declare function listToTree(list: any[], config?: Partial): T[]; export declare function treeToList(tree: any, config?: Partial, clearParentChildren?: boolean): T; export declare function findNode(tree: any, func: Fn, config?: Partial): T | null; export declare function findNodeAll(tree: any, func: Fn, config?: Partial): T[]; export declare function findPath(tree: any, func: Fn, config?: Partial): T | T[] | null; export declare function findPathAll(tree: any, func: Fn, config?: Partial): any[]; export declare function filter(tree: T[], func: (n: T) => boolean | string, config?: Partial): T[]; export declare function forEach(tree: T[], func: (n: T) => any, config?: Partial): void; /** * @description: Extract tree specified structure */ export declare function treeMap(treeData: T[], opt: { children?: string; conversion: Fn; }): T[]; /** * @description: Extract tree specified structure */ export declare function treeMapEach(data: any, { children, conversion }: { children?: string; conversion: Fn; }): any; export declare function findChildrens(tree: T[], childrenId: string | number, func: (n: T) => boolean | string, config?: Partial): T[]; export declare function findParents(tree: T[], parentId: string | number, func: (n: T) => boolean | string, config?: Partial): T[]; export {};