throttleByAnimationFrame.d.ts 259 B

123456
  1. type throttledFn = (...args: any[]) => void;
  2. type throttledCancelFn = {
  3. cancel: () => void;
  4. };
  5. declare function throttleByAnimationFrame<T extends any[]>(fn: (...args: T) => void): throttledFn & throttledCancelFn;
  6. export default throttleByAnimationFrame;