Package: effect
Module: Pull
Handles Cause.Done failures in an effect while leaving ordinary failures
in the error channel.
When to use
Use to recover from a Cause.Done completion signal in an effect, such as
turning a pull leftover value into a successful recovery effect while
preserving ordinary failures.
Details
The handler receives the done leftover value and may recover with a new effect. Non-done errors are preserved.
See
matchEffect for handling success, ordinary failure, and done outcomes explicitlyfilterDoneLeftover for extracting a done leftover from an existing CauseSignature
declare const catchDone: { <E, A2, E2, R2>(f: (leftover: Cause.Done.Extract<E>) => Effect<A2, E2, R2>): <A, R>(self: Effect<A, E, R>) => Effect<A | A2, ExcludeDone<E> | E2, R | R2>; <A, R, E, A2, E2, R2>(self: Effect<A, E, R>, f: (leftover: Cause.Done.Extract<E>) => Effect<A2, E2, R2>): Effect<A | A2, ExcludeDone<E> | E2, R | R2>; }
Since v4.0.0