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

Function assertSomeEdge

packages/effect/test/Graph.test.ts:6–11  ·  view source on GitHub ↗
(edge: Option.Option<Graph.Edge<E>>)

Source from the content-addressed store, hash-verified

4import { describe, expect, it } from "vitest"
5
6const assertSomeEdge = <E>(edge: Option.Option<Graph.Edge<E>>): Graph.Edge<E> => {
7 if (Option.isNone(edge)) {
8 throw new Error("Expected edge to be present")
9 }
10 return edge.value
11}
12
13const makeReversedUndirectedPath = () =>
14 Graph.undirected<string, number>((mutable) => {

Callers 1

Graph.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected