UNPKG

ts-prime

Version:

A utility library for JavaScript and Typescript.

14 lines 705 B
/** * The Debounce technique allow us to “group” multiple sequential calls in a single one. * @description * https://css-tricks.com/debouncing-throttling-explained-examples/ * @param func - Any provided function * @param debounceTimeMs - duration in milliseconds * @example * const debouncedLog = P.debounce(console.log, 500) * debouncedLog("I will be printed only if 500ms ago this function was not called") * @category Function */ export declare function debounce<E extends (...args: any[]) => any>(debounceTimeMs: number): (func: E) => E; export declare function debounce<E extends (...args: any[]) => any>(func: E, debounceTimeMs: number): E; //# sourceMappingURL=debounce.d.ts.map