Package: effect
Module: Cause
Replaces any errors in a Cause with a provided constant error.
Details
This function transforms all Fail errors into the specified error value,
preserving the structure of the Cause. It’s useful when you no longer need
the original error details but still want to keep the cause shape.
See
map Apply a custom transformation to Fail errorsSignature
declare const as: { <E2>(error: E2): <E>(self: Cause<E>) => Cause<E2>; <E, E2>(self: Cause<E>, error: E2): Cause<E2>; }
Since v2.0.0