( mutable: MutableGraph<N, E, T>, f: (mutable: MutableGraph<N, E, T>) => undefined )
| 659 | |
| 660 | /** @internal */ |
| 661 | const mutateScoped = <N, E, T extends Kind>( |
| 662 | mutable: MutableGraph<N, E, T>, |
| 663 | f: (mutable: MutableGraph<N, E, T>) => undefined |
| 664 | ): Graph<N, E, T> => { |
| 665 | let graph: Graph<N, E, T> |
| 666 | try { |
| 667 | f(mutable) |
| 668 | } finally { |
| 669 | graph = endMutation(mutable) |
| 670 | } |
| 671 | return graph |
| 672 | } |
| 673 | |
| 674 | /** |
| 675 | * Performs scoped mutations on a graph, automatically managing the mutation lifecycle. |
no test coverage detected