@yeger/debounce
Version:
A tiny TypeScript library for debouncing functions.
8 lines (7 loc) • 333 B
text/typescript
/**
* Debounce a callback with an optional delay.
* @param cb - The callback that will be invoked.
* @param delay - A delay after which the callback will be invoked.
* @returns The debounced callback.
*/
export declare function debounce<Args extends any[]>(cb: (...args: Args) => void, delay?: number): (...args: Args) => void;