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

Function fromNullishOr

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

Source from the content-addressed store, hash-verified

975
976/** @internal */
977export const fromNullishOr = <A>(value: A): Effect.Effect<NonNullable<A>, Cause.NoSuchElementError> =>
978 value == null ? fail(new NoSuchElementError()) : succeed(value)
979
980/** @internal */
981export 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