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

    Function doTimeout

    • Creates a delayed job which includes a promise that resolves after a specified timeout, with the ability to cancel or reject it manually.

      Parameters

      • timeout: number

        The number of milliseconds to wait before resolving the promise.

      Returns DelayJob

      An object representing the delayed job, containing:

      • promise: A Promise that resolves after the timeout (or immediately if canceled).
      • cancel(): Cancels the timeout and immediately resolves the promise.
      • reject(reason): Cancels the timeout and rejects the promise with the given reason.
      • timeoutId: The ID of the underlying setTimeout, useful for advanced control.