• Waits for the callback to return a true-ish value which resolves the promise.

    Type Parameters

    • T

    Parameters

    • callback: (() => OptionalPromise<undefined | T>)

      Callback function

    • timeout: number

      The time in ms if after which the callback did not return a true-ish value is expired

    • interval: number = 50

      The interval at which to execute the callback

    • Optional options: {
          rejectionMessage?: string;
          resolveOnTimeout?: boolean;
      }
      • Optional rejectionMessage?: string
      • Optional resolveOnTimeout?: boolean

    Returns Promise<T>

    Promise