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

Function exitFromEither

packages/effect/src/internal/core.ts:2551–2558  ·  view source on GitHub ↗
(either: Either.Either<R, L>)

Source from the content-addressed store, hash-verified

2549
2550/** @internal */
2551export const exitFromEither = <R, L>(either: Either.Either<R, L>): Exit.Exit<R, L> => {
2552 switch (either._tag) {
2553 case "Left":
2554 return exitFail(either.left)
2555 case "Right":
2556 return exitSucceed(either.right)
2557 }
2558}
2559
2560/** @internal */
2561export const exitFromOption = <A>(option: Option.Option<A>): Exit.Exit<A, void> => {

Callers

nothing calls this directly

Calls 2

exitSucceedFunction · 0.85
exitFailFunction · 0.70

Tested by

no test coverage detected