UNPKG

ts-prime

Version:

A utility library for JavaScript and Typescript.

16 lines 740 B
/** * The Debounce technique allow us to “group” multiple sequential calls in a single one. * @description * You can find great article that explains how throttle works [here](https://css-tricks.com/debouncing-throttling-explained-examples/) * @param func - Any provided function * @param debounceTimeMs - duration in milliseconds * @signature * P.throttle(func, throttleTimeMs) * @example * // Execute log * P.throttle(console.log, 1000) * @category Function */ export declare function throttle<E extends (...args: any[]) => any>(func: E, throttleTimeMs: number): E; export declare function throttle<E extends (...args: any[]) => any>(throttleTimeMs: number): (func: E) => E; //# sourceMappingURL=throttle.d.ts.map