• Returns a debounced version of the provided callback function.

    Type Parameters

    • T extends (...args: value[]) => ReturnType<T>

      The type of the original callback function.

    Parameters

    • func: T

      The original callback function.

    • Optionalwait: number

      The debounce wait time in milliseconds (default: 0).

    • Optionaloptions: Options

      Additional options for debouncing (default: {}).

    Returns DebouncedState<T>

    • An object containing the debounced callback and utility functions.