Constructors

Properties

pollRetrySleep: number = 20

The interval in milliseconds to wait before retrying the delegate function.

pollTimeout: number = 2000

The maximum time in milliseconds to wait before timing out the delegate function.

Methods

  • Polls the delegate function until it succeeds or the timeout is exceeded.

    Type Parameters

    • T

    Parameters

    • delegate: (() => Promise<T>)

      a function that returns a promise and may throw.

        • (): Promise<T>
        • Returns Promise<T>

    • retrySleep: number = Poller.pollRetrySleep

      the interval in milliseconds to wait before retrying the delegate function.

    • timeout: number = Poller.pollTimeout

      the maximum time in milliseconds to wait before timing out the delegate function.

    Returns Promise<T>

    Operation timed out if the timeout is exceeded.