export declare class Node { readonly key: string; readonly data: T; readonly incoming: Map>; readonly outgoing: Map>; constructor(key: string, data: T); } export declare class Graph { private readonly _hashFn; private readonly _nodes; constructor(_hashFn: (element: T) => string); roots(): Node[]; insertEdge(from: T, to: T): void; removeNode(data: T): void; lookupOrInsertNode(data: T): Node; lookup(data: T): Node | undefined; isEmpty(): boolean; toString(): string; /** * This is brute force and slow and **only** be used * to trouble shoot. */ findCycleSlow(): string | undefined; private _findCycle; }