UNPKG

@rooks/use-throttle

Version:
11 lines (9 loc) 337 B
/** * useThrottle * Throttles a function with a timeout and ensures * that the callback function runs at most once in that duration * @param fn The callback to throttle * @param timeout Throttle timeout */ declare function useThrottle(fn: Function, timeout?: number): [(...args: any) => any, boolean]; export default useThrottle;