UNPKG

@rushstack/operation-graph

Version:

Library for managing and executing operations in a directed acyclic graph.

22 lines 1.07 kB
export interface ISortableOperation<T extends ISortableOperation<T>> { name: string | undefined; criticalPathLength?: number | undefined; weight: number; consumers: Set<T>; } /** * For every operation in the input, computes the length of the longest chain of operations that depend on it. * This value is stored as `operation.criticalPathLength`. */ export declare function calculateCriticalPathLengths<T extends ISortableOperation<T>>(operations: Iterable<T>): T[]; /** * Calculates the shortest path from `startOperation` to `endOperation`. * Used when printing out circular dependencies. */ export declare function calculateShortestPath<T extends ISortableOperation<T>>(startOperation: T, endOperation: T): T[]; /** * Perform a depth-first search to find critical path length to the provided operation. * Cycle detection comes at minimal additional cost. */ export declare function calculateCriticalPathLength<T extends ISortableOperation<T>>(operation: T, dependencyChain: Set<T>): number; //# sourceMappingURL=calculateCriticalPath.d.ts.map