@sovereignbase/utils
    Preparing search index...

    Function afterIdleFor

    • Creates a function that runs the callback after no calls have happened for the requested timeout.

      Type Parameters

      • Args extends unknown[]

      Parameters

      • timeout: number

        Milliseconds to wait after the latest call.

      • callback: (...args: Args) => void

        Function to run after the idle timeout expires.

      Returns (...args: Args) => void

      Function that restarts the idle timeout whenever it is called.