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

Function fail

packages/effect/src/internal/result.ts:83–87  ·  view source on GitHub ↗
(failure: E)

Source from the content-addressed store, hash-verified

81
82/** @internal */
83export const fail = <E>(failure: E): Result.Result<never, E> => {
84 const a = Object.create(FailureProto)
85 a.failure = failure
86 return a
87}
88
89/** @internal */
90export const succeed = <A>(success: A): Result.Result<A> => {

Callers 7

effect.tsFile · 0.70
fromNullishOrFunction · 0.70
failSyncFunction · 0.70
try_Function · 0.70
failWithCatchFunction · 0.70
catchNoSuchElementFunction · 0.70
result.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected