Create a sortable precedence graph. If a type and precedence graph are given, then remove all nodes that are not of the given type in a way the preserves the original lineage.
Optional
type: (new (...args: never[]) => T)A type that extends T.
Optional
pg: PrecedenceGraph<unknown>A precedence graph.
Protected
adjacencyA map from nodes to the set of their upstream neighbors.
Protected
numberThe total number of edges in the graph.
Add the given node to this graph.
Remove the given node from the graph.
The node to remove.
Assign priorities to the nodes of the graph such that any two nodes of which one has precedence over the other, the priority of the one node is lower than the other.
Destroy the graph structure if true, leave it in tact by working on a copy if false (the default).
The minimum spacing between the priorities of two nodes that are in a precedence relationship. The default is 100.
True if priorities were assigned successfully, false if the graph has one or more cycles.
A precedence graph with nodes that are sortable by assigning a numeric priority.