// ets_tracing: off import * as E from "../../../../Either/index.js" import type * as C from "../core.js" import * as Map from "./map.js" import * as OrElse from "./orElse.js" /** * Switches to the provided stream in case this one fails with a typed error. * * See also `Stream#catchAll`. */ export function orElseEither_( self: C.Stream, that: C.Stream ): C.Stream> { return OrElse.orElse_(Map.map_(self, E.left), Map.map_(that, E.right)) } /** * Switches to the provided stream in case this one fails with a typed error. * * See also `Stream#catchAll`. * * @ets_data_first orElseEither_ */ export function orElseEither(that: C.Stream) { return (self: C.Stream) => orElseEither_(self, that) }