/** * Returns an effect that will produce the value of this effect, unless it * fails with the `None` value, in which case it will produce the value of * the specified effect. * * @tsplus static effect/core/io/Effect.Aspects orElseOptional * @tsplus pipeable effect/core/io/Effect orElseOptional */ export function orElseOptional(that: LazyArg, A2>>) { return (self: Effect, A>): Effect, A | A2> => self.catchAll((option) => option.fold(that, (e) => Effect.fail(Maybe.some(e)))) }