注销debounce打印

This commit is contained in:
walker 2024-01-26 18:37:29 +08:00
parent 1d5221dffb
commit 7f5aebf49c

View File

@ -6,7 +6,7 @@ export interface DebouncedFunction<F extends (...args: any[]) => any> {
export function debounce<F extends (...args: Parameters<F>) => any>(
fn: F,
waitMs = 250
waitMs = 250,
): DebouncedFunction<F> {
let timeoutId: ReturnType<typeof setTimeout> | undefined;
@ -20,7 +20,7 @@ export function debounce<F extends (...args: Parameters<F>) => any>(
};
if (timeoutId !== undefined) {
console.debug('debounce clear timeout', fn);
// console.debug('debounce clear timeout', fn);
clearTimeout(timeoutId);
}