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

Function toOption

packages/effect/src/internal/schema/parser.ts:19–19  ·  view source on GitHub ↗
(value: A)

Source from the content-addressed store, hash-verified

17export const sameExit: Success<unknown> = succeed(missing)
18
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

someMethod · 0.80

Tested by

no test coverage detected