UNPKG

y-taro-ui

Version:

基于taro的表单解决方案 & 基础组件

14 lines (13 loc) 461 B
/// <reference types="lodash" /> declare type noop = (...args: any) => any; export interface ThrottleOptions { wait?: number; leading?: boolean; trailing?: boolean; } declare function useThrottleFn<T extends noop>(fn: T, options?: ThrottleOptions): { run: import("lodash").DebouncedFunc<(...args: Parameters<T>) => ReturnType<T>>; cancel: () => void; flush: () => ReturnType<T> | undefined; }; export default useThrottleFn;