6 lines
288 B
TypeScript
6 lines
288 B
TypeScript
|
export interface DebouncedFunction<F extends (...args: any[]) => any> {
|
||
|
(context: ThisParameterType<F>, ...args: Parameters<F>): void;
|
||
|
cancel: () => void;
|
||
|
}
|
||
|
export declare function debounce<F extends (...args: Parameters<F>) => any>(fn: F, waitMs?: number): DebouncedFunction<F>;
|