Libraries
    Preparing search index...
    • A debounce function ensures that a function is not called too frequently. It only allows the function to be executed after a specified delay has passed since the last call.

      Type Parameters

      • T extends (...args: any[]) => void

      Parameters

      • func: T

        The function to debounce.

      • wait: number

        The delay before the function is called.

      • opts: { immediate?: boolean } = ...
        • Optionalimmediate?: boolean

          Whether the function should be called immediately. Default is false. If true, the function will be called immediately and then debounced. If the function is called multiple times during the timeout, it will only be called once.

      Returns (...args: Parameters<T>) => void