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