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