Interface DebouncedFunction<T>

A debounced function that will be delayed by a given wait time in milliseconds. If the method is called again before the timeout expires, the previous call will be aborted.

interface DebouncedFunction<T> {
    pending: boolean;
    clear(): void;
    flush(): void;
    (...args: T): void;
}

Type Parameters

  • T extends unknown[]

Properties

Methods

Properties

pending: boolean

Returns a boolean whether a debounce call is pending or not.

Methods

  • Clears the debounce timeout and omits calling the debounced function.

    Returns void

  • Clears the debounce timeout and calls the debounced function immediately.

    Returns void