/** * Fails with given error 'e' if value is `Left`. * * @tsplus static effect/core/stream/Stream.Aspects rightOrFail * @tsplus pipeable effect/core/stream/Stream rightOrFail */ export function rightOrFail( error: LazyArg ) { return (self: Stream>): Stream => self.mapEffect((either) => either.fold(() => Effect.failSync(error), Effect.succeed)) }