/** * Extracts the optional value, or fails with the given error 'e'. * * @tsplus static effect/core/stream/Stream.Aspects someOrFail * @tsplus pipeable effect/core/stream/Stream someOrFail */ export function someOrFail(e: LazyArg) { return (self: Stream>): Stream => self.mapEffect((option) => option.fold(Effect.failSync(e), Effect.succeed)) }