@huukhanhnguyen/model / core/graphSnapshot
core/graphSnapshot
assertEdgeTypes()
assertEdgeTypes(
snapshot,registry?):GraphAssertResult
(b) every edge's type matches the consuming arg type — when registry is provided and consumer method is known. Edges without a matching arg are OK (structural dependents).
Parameters
snapshot
registry?
Returns
assertGraphClosed()
assertGraphClosed(
snapshot,registry?):GraphAssertResult
Parameters
snapshot
registry?
Returns
assertNoCycle()
assertNoCycle(
snapshot):GraphAssertResult
(a) no cycle — DFS; fails naming a cycle path.
Parameters
snapshot
Returns
assertReachableFromRoots()
assertReachableFromRoots(
snapshot):GraphAssertResult
(c) every node reachable from a root (nodes with no inbound edge).
Parameters
snapshot
Returns
graphSnapshotOf()
graphSnapshotOf(
source):GraphSnapshot
Build a snapshot from a Model-like source (nodes collection + optional registry). Edges come from live _dependents (dependOn / withEvaluating).
Parameters
source
Returns
snapshotToDot()
snapshotToDot(
snapshot):string
Parameters
snapshot
Returns
string
snapshotToMermaid()
snapshotToMermaid(
snapshot):string
Parameters
snapshot
Returns
string