export interface IObjectEachOptions { depthFirst?: boolean; /** * 深度遍历的回弹(出栈)遍历函数 * eachFunc 相当于在入栈时执行,而 depthReboundFunc 在出栈时执行 * 执行时意味着所有子节点已经遍历完了 * * @param value * @param key * @param info */ depthReboundFunc?: (value: any, key: string, info: { parent: any; deep: number; keyPath?: string[]; }) => any; checkCycle?: boolean; /** * 循环依赖回调 * @param value * @param key * @param parent * @param keyPath * @param firstPath 出现循环依赖的对象第一次出现的 keyPath */ checkCycleCallback?: (value: any, key: string, info: { parent: any; keyPath?: string[]; firstKeyPath?: string[]; }) => void; needKeyPath?: boolean; /** 仅遍历指定 key 的 children * @example * {children:{ * item1:{value:1, children:{ * item2:{value:1} * } } * }} */ childrenKey?: string; } declare enum EachControl { exit = -1, break = -2, continue = -3 } interface IEachControls { exit: EachControl.exit; break: EachControl.break; continue: EachControl.continue; } /** * 对象遍历, 遍历对象的每一个键 * * @param object * @param eachFunc 遍历函数。返回 -1 时终止遍历(exit);返回 -2 时终止当层遍历(break); 返回 -3 跳到下一个遍历(continue) * @param options */ export declare function objectEach(object: any, eachFunc: (value: any, key: string, info: { parent: any; deep: number; end: boolean; keyPath?: string[]; }, CONTOL: IEachControls) => void | -1 | -2 | -3, options?: IObjectEachOptions): void; export {}; //# sourceMappingURL=objectEach.d.ts.map