/** * Switches over to the stream produced by the provided function in case this * one fails with a typed error. * * @tsplus static effect/core/stream/Stream.Aspects catchAll * @tsplus pipeable effect/core/stream/Stream catchAll */ export function catchAll( f: (e: E) => Stream ) { return (self: Stream): Stream => self.catchAllCause((cause) => cause.failureOrCause.fold(f, (cause) => Stream.failCause(cause))) }