/** * The same as `timeout`, but instead of producing a `None` in the event of * timeout, it will produce the specified error. * * @tsplus static effect/core/io/Effect.Aspects timeoutFail * @tsplus pipeable effect/core/io/Effect timeoutFail */ export function timeoutFail(e: LazyArg, duration: Duration) { return (self: Effect): Effect => self.timeoutTo(Effect.failSync(e), Effect.succeed, duration).flatten }