export declare const BREAK: unique symbol; export declare const FOUND: symbol; /** * Generic graph/tree traversal supporting both DFS and BFS * @param root - Starting node(s) * @param mode - "d" for DFS (depth-first), "b" for BFS (breadth-first) * @param traverser - Function receiving (node, path) where path is ancestors from root (not including node). * Returns next nodes, or BREAK to stop and return current node. * @param cycle_breaker - Optional function or boolean for cycle detection * @returns The node that caused a BREAK, or null if traversal completed */ export declare function traverse(root: T | T[], mode: "d" | "b", traverser: (node: T, path: T[]) => T[] | typeof BREAK | null, cycle_breaker?: boolean | ((node: T) => any) | null): T | null; export declare function bft(root: T | T[], traverser: (node: T, path: T[]) => T[] | typeof BREAK): T | null; export declare function dft(root: T | T[], traverser: (node: T, path: T[]) => T[] | typeof BREAK): T | null;