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

Function fail

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

doneFunction · 0.70
failMethod · 0.65

Tested by

no test coverage detected