@types/async-rerun
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Installation

npm install --save @types/async-rerun

Summary

This package contains type definitions for async-rerun (https://github.com/fahidarif/rerun#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/async-rerun.

index.d.ts

type CallBackFunction = () => Promise<any>;

/**
 * @param fn The function which will be used as parameter should return a PROMISE & SHOULD NOT HAVE ANY PARAMETER it's compulsory, as its a async retry mechanism. Also you can BIND the global scope too with the function in order use the global scoped variables like this => <function name>.bind(this).
 * @param maxRetries Max Retries in number.
 * @param delayInMS Delay time for retries in number as mili-seconds(ms).
 * @param alwaysRetry To retry always untill the positive response, If its true then maxRetries will not count.
 * @param showLogs To show logs for all retries.
 */
declare function runAsync(
    fn: CallBackFunction,
    maxRetries: number,
    delayInMS: number,
    alwaysRetry?: boolean,
    showLogs?: boolean,
): Promise<any>;

export { runAsync };

Additional Details

  • Last updated: Mon, 04 Dec 2023 22:35:50 GMT
  • Dependencies: none

Credits

These definitions were written by M Fahad A..

/@types/async-rerun/

    Package Sidebar

    Install

    npm i @types/async-rerun

    Weekly Downloads

    5

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    4.2 kB

    Total Files

    5

    Last publish

    Collaborators

    • types