UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

14 lines 617 B
import type { ITreeNodeLike } from "../tree-model.js"; /** * @public * Similar to a reducer, but without the return requirement. It otherwise behaves like {@link treeIterate}. * * @param node - The start point. * @param collected - The reduced value. * @param callback - Called for each node, including the start point. * * @remarks * See {@link treeCollect}. */ export declare function treeCollect<TRet, TNode extends ITreeNodeLike<TNode>>(node: TNode, collected: TRet, callback: (collected: TRet, node: TNode, parent: TNode | null, depth: number) => void): TRet; //# sourceMappingURL=tree-collect.d.ts.map