geoview-core - v2.1.2
    Preparing search index...

    Function doUntilPromise

    • 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.
      • The provided promise has 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.

      • promise: Promise<unknown>

        A Promise whose completion will also stop the interval.

      • intervalMs: number

        The interval duration in milliseconds.

      Returns DoUntilJob

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