UNPKG

422 BTypeScriptView Raw
1declare type NodeId = string;
2declare type Cycle = NodeId[];
3export declare type Cycles = Cycle[];
4export declare type PartitionedCycles = {
5 cyclesStartWithThisNode: Cycle[];
6 cyclesWithThisNode: Cycle[];
7};
8export declare function getCycle(ancestors: NodeId[], nodeId: NodeId): Cycle | null;
9export declare function partitionCycles(nodeId: NodeId, allCyclesTheNodeIsPartOf: Cycle[]): PartitionedCycles;
10export {};