// ets_tracing: off import type * as C from "../core.js" import * as CatchAll from "./catchAll.js" /** * Returns a new channel that will perform the operations of this one, until failure, and then * it will switch over to the operations of the specified fallback channel. */ export function orElse_< Env, Env1, InErr, InErr1, InElem, InElem1, InDone, InDone1, OutErr, OutErr1, OutElem, OutElem1, OutDone, OutDone1 >( self: C.Channel, that: C.Channel ): C.Channel< Env & Env1, InErr & InErr1, InElem & InElem1, InDone & InDone1, OutErr | OutErr1, OutElem | OutElem1, OutDone | OutDone1 > { return CatchAll.catchAll_(self, (_) => that) } /** * Returns a new channel that will perform the operations of this one, until failure, and then * it will switch over to the operations of the specified fallback channel. * * @ets_data_first orElse_ */ export function orElse( that: C.Channel ) { return ( self: C.Channel ) => orElse_(self, that) }