type OptionsType = Partial<{ leading: boolean; trailing: boolean; maxWait: number; }>; interface IDebounce any> { (...args: Parameters): ReturnType | undefined; cancel(): void; flush(): ReturnType | undefined; } /** * The useDebounce function is a React hook that returns a debounced version of the callback function. * * @example const log = useDebounce((params) => console.log(params), 1000); * * @param callback automatically inferred type of function * @param delay number Determine how long to wait before * @param deps Tell react when to recreate the useDebounce hook * @param options OptionsType Pass in the trailing and leading options * * @return A function that is debounced * */ export declare const useDebounce: any>(callback: T, delay: number, deps?: any[], options?: OptionsType) => IDebounce; export {};