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

Function fromOptionExit

packages/effect/src/internal/schema/parser.ts:21–22  ·  view source on GitHub ↗
(option: Option.Option<A>)

Source from the content-addressed store, hash-verified

19export const toOption = <A>(value: A): Option.Option<A> => value === missing ? Option.none() : Option.some(value as A)
20
21export const fromOptionExit = <A>(option: Option.Option<A>): Success<A | typeof missing> =>
22 option._tag === "None" ? missingExit : succeed(option.value)

Callers

nothing calls this directly

Calls 1

succeedFunction · 0.50

Tested by

no test coverage detected