API Core - v1.5.0
    Preparing search index...

    Class DisposableTimeout

    Disposable wrapper around setTimeout for internal background bookkeeping (e.g. the auto-sync cadence). Auto-clears the previous timeout when rescheduled and unrefs the underlying handle so a scheduled callback never keeps the Node event loop alive on its own — callers are still notified on the regular loop, but a script that has nothing left to do can exit immediately.

    Implements

    • Disposable
    Index
    • get isActive(): boolean

      Whether a timeout is currently scheduled and has not yet fired or been cleared.

      Returns boolean

      true if a timeout is pending.

    • Schedule a callback after ms milliseconds, replacing any existing timeout.

      Parameters

      • callback: () => void

        The function to invoke when the timeout fires.

      • ms: number

        The delay in milliseconds before invoking the callback.

      Returns void