Retry a task

Type Parameters

  • T extends any

Hierarchy

  • Retry

Constructors

Accessors

Methods

Constructors

Accessors

Methods

  • Abort the task

    Remarks

    If the task is not running, this method does nothing. If the task is running, it will be aborted and the promise returned by () will be rejected with an AbortError.

    Returns void

  • Run the task

    Returns

    The result of the task

    Throws

    AbortError

    Throws

    Error If the task fails and the retry limit is reached

    Returns Promise<Awaited<T>>

  • Type Parameters

    • TResult1 = T

    • TResult2 = never

    Parameters

    • Optional onfulfilled: null | ((value: T) => TResult1 | PromiseLike<TResult1>)
    • Optional onrejected: null | ((reason: any) => TResult2 | PromiseLike<TResult2>)

    Returns Promise<TResult1 | TResult2>

Generated using TypeDoc