geoview-core
    Preparing search index...

    Function doUntil

    • Repeatedly invokes a callback function at a given interval until it returns true or until timeout is reached. Once the callback returns true or the timeout expires, the interval is cleared and the polling stops.

      Type Parameters

      • T

      Parameters

      • callback: () => T

        A function that is called every ms milliseconds. If it returns true, the interval is cleared.

      • ms: number

        The interval time in milliseconds between callback executions.

      • Optionaltimeout: number

        Optional timeout in milliseconds. If provided, the interval will be automatically cleared after this duration, regardless of callback return value.

      Returns Timeout

      The interval timer ID, which can be used to clear the interval manually if needed.