Options
All
  • Public
  • Public/Protected
  • All
Menu

The return type of retry

Type parameters

  • F: (...args: any[]) => any

Hierarchy

  • Promise<ReturnType<F> | void>
    • RetryResult

Index

Properties

Promise

Promise: PromiseConstructor

[Symbol.toStringTag]

[Symbol.toStringTag]: string

cancel

cancel: (reason?: undefined | string) => void

Cancels retrying.

param

Optional reason to reject results with.

Type declaration

    • (reason?: undefined | string): void
    • Parameters

      • Optional reason: undefined | string

      Returns void

Methods

catch

  • catch<TResult>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<(ReturnType<F> | void) | TResult>
  • Attaches a callback for only the rejection of the Promise.

    Type parameters

    • TResult

    Parameters

    • Optional onrejected: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null

      The callback to execute when the Promise is rejected.

    Returns Promise<(ReturnType<F> | void) | TResult>

    A Promise for the completion of the callback.

finally

  • finally(onfinally?: (() => void) | undefined | null): Promise<ReturnType<F> | void>
  • Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

    Parameters

    • Optional onfinally: (() => void) | undefined | null

      The callback to execute when the Promise is settled (fulfilled or rejected).

    Returns Promise<ReturnType<F> | void>

    A Promise for the completion of the callback.

then

  • then<TResult1, TResult2>(onfulfilled?: ((value: ReturnType<F> | void) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>
  • Attaches callbacks for the resolution and/or rejection of the Promise.

    Type parameters

    • TResult1

    • TResult2

    Parameters

    • Optional onfulfilled: ((value: ReturnType<F> | void) => TResult1 | PromiseLike<TResult1>) | undefined | null

      The callback to execute when the Promise is resolved.

    • Optional onrejected: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null

      The callback to execute when the Promise is rejected.

    Returns Promise<TResult1 | TResult2>

    A Promise for the completion of which ever callback is executed.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc