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

Function finalize

packages/effect/src/internal/graph.ts:190–203  ·  view source on GitHub ↗
(source: GraphImpl<N, E, T>)

Source from the content-addressed store, hash-verified

188
189/** @internal */
190export const finalize = <N, E, T extends Graph.Kind>(source: GraphImpl<N, E, T>): GraphImpl<N, E, T> => {
191 const graph: GraphImpl<N, E, T> = Object.create(ProtoGraph)
192 graph.type = source.type
193 graph.mutable = false
194 graph.transforming = false
195 graph.nodes = source.nodes
196 graph.edges = source.edges
197 graph.adjacency = source.adjacency
198 graph.reverseAdjacency = source.reverseAdjacency
199 graph.nextNodeIndex = source.nextNodeIndex
200 graph.nextEdgeIndex = source.nextEdgeIndex
201 graph.acyclic = source.acyclic
202 return graph
203}
204
205/** @internal */
206export const snapshot = <N, E, T extends Graph.Kind>(graph: Graph.Graph<N, E, T>): Graph.Snapshot<N, E, T> => {

Callers 5

failCauseUnsafeFunction · 0.50
shutdownUnsafeFunction · 0.50
waitToOfferFunction · 0.50
releaseCapacityFunction · 0.50
makeOpenApiFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected