debounce.d.ts 632 B

123456789
  1. export type Procedure = (...args: any[]) => void;
  2. /**
  3. * @link https://davidwalsh.name/javascript-debounce-function
  4. * @param func needs to implement a function which is debounced
  5. * @param wait how long do you want to wait till the previous declared function is executed
  6. * @param isImmediate defines if you want to execute the function on the first execution or the last execution inside the time window. `true` for first and `false` for last.
  7. */
  8. declare const _default: <F extends Procedure>(func: F, wait: number, isImmediate?: boolean) => (this: ThisParameterType<F>, ...args: Parameters<F>) => void;
  9. export default _default;