vue-hooks-plus
Version:
Vue hooks library
10 lines (9 loc) • 389 B
TypeScript
import { UseThrottleOptions } from '../useThrottle';
import { DebouncedFunc } from 'lodash-es';
type noop = (...args: any) => any;
declare function useThrottleFn<T extends noop>(fn: T, options?: UseThrottleOptions): {
run: DebouncedFunc<T> | (() => void);
cancel: (() => void) | undefined;
flush: (() => ReturnType<T> | undefined) | undefined;
};
export default useThrottleFn;