注销debounce打印
This commit is contained in:
parent
1d5221dffb
commit
7f5aebf49c
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user