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

Function getMutableImplForMutation

packages/effect/src/Graph.ts:383–392  ·  view source on GitHub ↗
(
  graph: MutableGraph<N, E, T>
)

Source from the content-addressed store, hash-verified

381
382/** @internal */
383const getMutableImplForMutation = <N, E, T extends Kind>(
384 graph: MutableGraph<N, E, T>
385): internal.GraphImpl<N, E, T> => {
386 assertMutable(graph)
387 if (internal.isTransforming(graph)) {
388 throw new GraphError({ message: "Cannot mutate graph during a transformation" })
389 }
390 csr.invalidate(graph)
391 return internal.toImpl(graph)
392}
393
394/** @internal */
395const withMutationGuard = <N, E, T extends Kind, A>(

Callers 15

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
removeNodeFunction · 0.85

Calls 2

assertMutableFunction · 0.85
invalidateMethod · 0.65

Tested by

no test coverage detected