import { listToTree } from './list-to-tree'; import { treeToList } from './tree-to-list'; import treeTraverse from './tree-traverse'; export { treeToList, listToTree, treeTraverse }; 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, config?: Partial): T[]; export declare function forEach(tree: T[], func: (n: T) => any, config?: Partial): void; /** * @description: 提取指定结构的树 */ export declare function treeMap(treeData: T[], opt: { children?: string; conversion: Fn; }): T[]; /** * @description: 提取指定结构的树 */ export declare function treeMapEach(data: any, { children, conversion }: { children?: string; conversion: Fn; }): any; /** * 获取树节点的后代节点数组 * * @param {*} node 树的节点 * @param {*} options {childrenField: children字段名,默认为 'children'} * @returns */ export declare function descendant(node: any, options?: { childrenField?: string; }, ret?: any[]): any[];