@visa/nova-react
Version:
Visa Product Design System Nova React library. Compatible with React ^19.
13 lines (12 loc) • 537 B
TypeScript
/**
* Debounces expensive function, only calling the function after it's last call has waited for specified delay
* @related button, input
* @param {Function} callback - Function that runs after last delay
* @param {number} delay - Length of time to wait since last call was made (milliseconds)
* @returns {(...args: any[]) => void} Delayed callback
*/
export declare const useDebounce: {
<T extends (...args: any[]) => void>(callback: T, delay?: number | undefined): T;
displayName: string;
};
export default useDebounce;