@loken/hierarchies
Version:
Library for working with hierarchies of identifiers and identifiable objects.
21 lines • 778 B
TypeScript
import { type Some } from '@loken/utilities';
import type { GraphTraversal, SignalNodes, TraversalType, NextNodes } from './graph.types.ts';
/**
* Flatten a graph of nodes by traversing the provided `roots` according to the options.
*/
export declare const flattenGraph: <TNode>(options: GraphTraversal<TNode>) => TNode[];
/** @internalexport */
export declare const flattenSignalGraph: <TNode>(options: {
roots: Some<TNode>;
signal: SignalNodes<TNode>;
detectCycles?: boolean;
type?: TraversalType;
}) => TNode[];
/** @internalexport */
export declare const flattenFullGraph: <TNode>(options: {
roots: Some<TNode>;
next: NextNodes<TNode>;
type?: TraversalType;
detectCycles?: boolean;
}) => TNode[];
//# sourceMappingURL=graph-flatten.d.ts.map