geoview-core
    Preparing search index...

    Function whenThisThen

    • This asynchronous generic function checks for a validity of something via the checkCallback() until it's found or until the timer runs out. This method returns a Promise which the developper can use to await or use .then().catch().finally() principles.

      Type Parameters

      • T

      Parameters

      • checkCallback: () => T

        The function executed to verify a particular condition until it's passed

      • Optionaltimeout: number

        The duration in milliseconds until the task is aborted (defaults to 10 seconds)

      • OptionalcheckFrequency: number

        The frequency in milliseconds to check for an update (defaults to 100 milliseconds)

      Returns Promise<T>