@kamilmielnik/trie
Version:
Trie data structure implementation in TypeScript. Highly performant. No dependencies. Built for a Scrabble Solver.
10 lines (9 loc) • 530 B
TypeScript
import type { Node, TraverseCallback, TraverseOptions } from '../types';
/**
* Visits every descendant {@link Node} of given {@link Node} and calls a callback.
*
* @param node - {@link Node} to look for descendant {@link Node | Nodes} in.
* @param callback - Callback that will be called for each visited {@link Node}. Return true from callback to stop traversing.
* @param options - See {@link TraverseOptions}.
*/
export declare const traverse: (node: Node, callback: TraverseCallback, options?: TraverseOptions) => void;