import { Pipeline } from '../types'; interface RetryWhenOptions { /** * Maximum number of retries. * * @type {number} * @memberof RetryWhenOptions */ readonly maxRetryAttempts?: number; /** * Timeout to wait between each retry. * * @type {number} * @memberof RetryWhenOptions */ readonly scalingDuration?: number; /** * Custom error to throw if required. * * @type {Error} * @memberof RetryWhenOptions */ readonly error?: Error; } /** * * This decorator tries to execute fnStep until condition is meet or maxRetryAttempts are tried. * * * @param {Pipeline.StepFunction} fnStep step executed * @param {(result:any) => boolean} condition condition that when true stops the retry and returns the result of the pipeline * @param {RetryWhenOptions} options indicate custom values that overwrite the defaults for maxRetryAttempts (3), scalingDuration (10 ms) and error. * @returns {Pipeline.StepFunction} */ export declare function retryWhen(fnStep: Pipeline.StepFunction, condition: (result?: any, i?: number) => boolean, options?: RetryWhenOptions): Pipeline.StepFunction; export {}; //# sourceMappingURL=retry-when.d.ts.map