/** * @module Resilience */ import { type MiddlewareFn } from "../../../middleware/contracts/_module.js"; import { type RetryCallbacks } from "../../../resilience/implementations/retry/_module.js"; import { type ITimeSpan } from "../../../time-span/contracts/_module.js"; import { type ErrorPolicySettings } from "../../../utilities/_module.js"; /** * IMPORT_PATH: `"@daiso-tech/core/resilience"` * @group Middlewares */ export type RetryIntervalSettings = Array> = RetryCallbacks & ErrorPolicySettings & { time: ITimeSpan; interval: ITimeSpan; /** * If true last error will be thrown otherwise an {@link RetryIntervalResilienceError | `RetryIntervalResilienceError`} will be thrown. * * @default false */ throwLastError?: boolean; }; /** * IMPORT_PATH: `"@daiso-tech/core/resilience"` * @group Middlewares * @throws {RetryIntervalResilienceError} */ export declare function retryInterval, TReturn>(settings: RetryIntervalSettings): MiddlewareFn>;