UNPKG

@n0safe/indirectus

Version:
17 lines 870 B
export declare class Tree<T> { constructor(); branches: Map<string, Tree<T> | T>; traverse(cb: (value: Tree<T> | T, path: string[], isEnd: boolean, tree: Tree<T>) => void, parent?: Tree<T>, path?: string[]): void; forEach(cb: (value: T, path: string[], isEnd: boolean, tree: this) => void, path?: string[]): void; map<R>(cb: (value: T, path: string[], isEnd: boolean, tree: Tree<T>) => R, path?: string[]): Tree<R>; filter(cb: (value: T, path: string[], isEnd: boolean, tree: Tree<T>) => boolean, path?: string[]): Tree<T>; reduce<R>(cb: (acc: R, value: T, path: string[], isEnd: boolean, tree: Tree<T>) => R, acc: R): R; toArrayWithMeta(): { value: T; path: string[]; isEnd: boolean; }[]; toArray(): T[]; } export declare const fsDeepTree: (dir: string) => Tree<string>; //# sourceMappingURL=tree.d.ts.map