Package: effect
Module: Sink
Handles typed errors from this sink with an effectful fallback value.
When to use
Use to recover from a typed sink failure by producing the replacement
result with an Effect.
See
catchCause for recovering from the full failure causeorElse for recovering by switching to another sinkSignature
declare const catch: { <E, A2, E2, R2>(f: (error: Types.NoInfer<E>) => Effect.Effect<A2, E2, R2>): <A, In, L, R>(self: Sink<A, In, L, E, R>) => Sink<A2 | A, In, L, E, R2 | R>; <A, In, L, E, R, A2, E2, R2>(self: Sink<A, In, L, E, R>, f: (error: E) => Effect.Effect<A2, E2, R2>): Sink<A | A2, In, L, E2, R | R2>; }
Since v4.0.0