( graph: MutableGraph<N, E, T> )
| 381 | |
| 382 | /** @internal */ |
| 383 | const 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 */ |
| 395 | const withMutationGuard = <N, E, T extends Kind, A>( |
no test coverage detected