NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/xe-utils/methods/array/searchTree.d.ts

34 lines
1.1 KiB
TypeScript
Raw Normal View History

2023-09-14 14:47:11 +08:00
import { XEUtilsMethods } from '../xe-utils'
export declare function searchTreeIterate(item: any, index: number, items: any[], path: string[], parent: any, nodes: any[]): any;
export interface SearchTreeOptions {
children?: string;
mapChildren?: string;
original?: boolean;
}
/**
*
* @param {Object} obj /
* @param {Function} iterate(item, index, items, path, parent, nodes)
* @param {Object} options {children: 'children'}
* @param {Object} context
*/
export declare function searchTree(array: any[], iterate: typeof searchTreeIterate, options?: SearchTreeOptions, context?: any): any[];
declare module '../xe-utils' {
interface XEUtilsMethods {
/**
*
* @param {Object} obj /
* @param {Function} iterate(item, index, items, path, parent, nodes)
* @param {Object} options {children: 'children'}
* @param {Object} context
*/
searchTree: typeof searchTree;
}
}
export default searchTree