UNPKG

@cc-heart/utils

Version:

🔧 javascript common tools collection

10 lines (9 loc) • 491 B
import { type fn } from '../typings/helper'; /** * Returns a debounced version of the provided function that delays its * execution until a certain amount of time has passed since the last time it was called. * @param fn - The function to be debounced. * @param delay - The number of milliseconds to wait before executing the function. * @return - The debounced version of the provided function. */ export declare function useDebounce(fn: fn, delay?: number): (...args: any) => void;