UNPKG

377 BTypeScriptView Raw
1import type { ThrottleOptions } from '../useThrottle/throttleOptions';
2type noop = (...args: any[]) => any;
3declare function useThrottleFn<T extends noop>(fn: T, options?: ThrottleOptions): {
4 run: import("lodash").DebouncedFunc<(...args: Parameters<T>) => ReturnType<T>>;
5 cancel: () => void;
6 flush: () => ReturnType<T> | undefined;
7};
8export default useThrottleFn;