MCPcopy
hub / github.com/Effect-TS/effect / fail

Function fail

packages/effect/src/internal/stream/emit.ts:31–33  ·  view source on GitHub ↗
(this: Emit.Emit<R, E, A, B>, e: E)

Source from the content-addressed store, hash-verified

29 return this(Effect.fail(Option.none()))
30 },
31 fail(this: Emit.Emit<R, E, A, B>, e: E) {
32 return this(Effect.fail(Option.some(e)))
33 },
34 fromEffect(this: Emit.Emit<R, E, A, B>, effect: Effect.Effect<A, E, R>) {
35 return this(Effect.mapBoth(effect, { onFailure: Option.some, onSuccess: Chunk.of }))
36 },

Callers

nothing calls this directly

Calls 2

doneFunction · 0.70
failMethod · 0.65

Tested by

no test coverage detected