geoview-core
    Preparing search index...

    Function doUntilPromises

    • Repeatedly invokes a callback function at a specified interval until one of two conditions is met:

      • The callback function explicitly returns true, indicating the interval should be cleared.
      • All provided promises have resolved or rejected. This is useful for performing a recurring action (e.g., logging or polling) that can end either due to external completion logic or once all promises are settled.

      Type Parameters

      • T

      Parameters

      • callback: () => T

        A function executed on each interval. If it returns true, the interval is cleared.

      • promises: Promise<unknown>[]

        An array of promises whose completion will also stop the interval.

      • ms: number

        The interval duration in milliseconds.

      Returns Timeout

      The interval timer, which can be cleared manually if needed.