UNPKG

@naverpay/hidash

Version:

improved lodash

12 lines (10 loc) 398 B
interface ThrottleOptions { leading?: boolean; maxWait?: number; trailing?: boolean; } declare const throttle: <Return, Arguments extends unknown[]>(func: (...args: Arguments) => Return, wait?: number, { leading, trailing, maxWait }?: ThrottleOptions) => { throttled: (...args: Arguments) => Return | undefined; cancel: () => void; }; export { throttle as default, throttle };