UNPKG

410 BTypeScriptView Raw
1/// <reference types="lodash" />
2import type { DebounceOptions } from '../useDebounce/debounceOptions';
3type noop = (...args: any[]) => any;
4declare function useDebounceFn<T extends noop>(fn: T, options?: DebounceOptions): {
5 run: import("lodash").DebouncedFunc<(...args: Parameters<T>) => ReturnType<T>>;
6 cancel: () => void;
7 flush: () => ReturnType<T> | undefined;
8};
9export default useDebounceFn;