UNPKG

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