Skip to main content

CommonDebounce

Callable

  • CommonDebounce<argsT, retT>(func: (...args: argsT) => retT): (waitInterval: number, ...args: argsT) => retT

  • Creates a debounced wrapper for the provided function with the provided wait time. The wrapped function will not be called as long as the debounced function continues to be called. If the debounced function is called, and then not called again within the wait time, the wrapped function will be called.


    Type parameters

    • argsT: any[]
    • retT

    Parameters

    • func: (...args: argsT) => retT

      The function to debounce

      Returns (waitInterval: number, ...args: argsT) => retT

      • A debounced version of the provided function
        • (waitInterval: number, ...args: argsT): retT
        • Parameters

          • waitInterval: number
          • rest...args: argsT

          Returns retT