import { LibraryPackage } from '../model/library'; export declare type Depth = number; export declare class BuildGraph { nodes: Set; dependents: Map>; dependencies: Map>; add(node: T): void; dependsOn(node: T, dependsOn: T): void; } /** * DFS algorithm taken from wikipedia: * https://en.wikipedia.org/wiki/Topological_sorting#Depth-first_search * * L ← Empty list that will contain the sorted nodes * while there are unmarked nodes do * select an unmarked node n * visit(n) * * function visit(node n) * if n has a permanent mark then return * for each node m with an edge from n to m do * visit(m) * mark n permanently * add n to head of L */ export declare function buildOrder(graph: BuildGraph): Array; export declare function dependencyGraph(libraries: Array): BuildGraph;