MCPcopy Index your code
hub / github.com/Effect-TS/effect / exitFromOption

Function exitFromOption

packages/effect/src/internal/core.ts:2561–2568  ·  view source on GitHub ↗
(option: Option.Option<A>)

Source from the content-addressed store, hash-verified

2559
2560/** @internal */
2561export const exitFromOption = <A>(option: Option.Option<A>): Exit.Exit<A, void> => {
2562 switch (option._tag) {
2563 case "None":
2564 return exitFail(void 0)
2565 case "Some":
2566 return exitSucceed(option.value)
2567 }
2568}
2569
2570/** @internal */
2571export const exitGetOrElse = dual<

Callers

nothing calls this directly

Calls 2

exitSucceedFunction · 0.85
exitFailFunction · 0.70

Tested by

no test coverage detected