// ets_tracing: off import type * as CS from "../../../../Cause/index.js" import * as C from "../core.js" /** * A more powerful version of `mapError` which also surfaces the `Cause` of the channel failure */ export function mapErrorCause_< Env, InErr, InElem, InDone, OutErr, OutErr2, OutElem, OutDone >( self: C.Channel, f: (cause: CS.Cause) => CS.Cause ): C.Channel { return C.catchAllCause_(self, (cause) => C.failCause(f(cause))) } /** * A more powerful version of `mapError` which also surfaces the `Cause` of the channel failure * * @ets_data_first mapErrorCause_ */ export function mapErrorCause( f: (cause: CS.Cause) => CS.Cause ) { return ( self: C.Channel ) => mapErrorCause_(self, f) }