Fetches resource several times until an expected condition is reached, timeouts, or throws an exception.

  • Type Parameters

    • R
    • T

    Parameters

    • stop: WaitForStopCondition<T>

      The condition to stop waiting

    • fetcher: ResourceFetcher<T, R>

      The method to retrieve resource

    • request: R

      The resource request options

    • Optionaloptions: WaitForOptions<T>

      The retry strategy options

    • strategy: IntervalStrategy = ...

      An optional custom strategy

    Returns Promise<Awaited<T>>

    A promise of resource