MCPcopy Create free account
hub / github.com/Effect-TS/effect / assertMutable

Function assertMutable

packages/effect/src/Graph.ts:442–448  ·  view source on GitHub ↗

@internal

(
  graph: Graph<N, E, T> | MutableGraph<N, E, T>
)

Source from the content-addressed store, hash-verified

440
441/** @internal */
442function assertMutable<N, E, T extends Kind = "directed">(
443 graph: Graph<N, E, T> | MutableGraph<N, E, T>
444): asserts graph is MutableGraph<N, E, T> {
445 if (!graph.mutable) {
446 throw new GraphError({ message: "Graph is not mutable" })
447 }
448}
449
450// =============================================================================
451// Constructors

Callers 14

endMutationFunction · 0.85
addNodeFunction · 0.85
updateNodeFunction · 0.85
updateEdgeFunction · 0.85
mapNodesFunction · 0.85
mapEdgesFunction · 0.85
reverseFunction · 0.85
filterMapNodesFunction · 0.85
filterMapEdgesFunction · 0.85
filterNodesFunction · 0.85
filterEdgesFunction · 0.85
addEdgeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected