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

Function fromNullishOr

packages/effect/src/internal/effect.ts:1149–1150  ·  view source on GitHub ↗
(value: A)

Source from the content-addressed store, hash-verified

1147
1148/** @internal */
1149export const fromNullishOr = <A>(value: A): Effect.Effect<NonNullable<A>, Cause.NoSuchElementError> =>
1150 value == null ? fail(new NoSuchElementError()) : succeed(value)
1151
1152/** @internal */
1153export const yieldNowWith: (priority?: number) => Effect.Effect<void> = makePrimitive({

Callers

nothing calls this directly

Calls 2

failFunction · 0.70
succeedFunction · 0.70

Tested by

no test coverage detected