Update prettier
This commit is contained in:
committed by
Umputun
parent
11f222c6e3
commit
71e0e98e05
@@ -5,7 +5,7 @@ export default function debounce<T extends any[]>(
|
||||
wait: number = 1000
|
||||
): (...args: Parameters<typeof fn>) => void {
|
||||
let timeout: number | undefined;
|
||||
return function(this: any, ...args): void {
|
||||
return function (this: any, ...args): void {
|
||||
const laterCall = (): unknown => fn.apply(this, args);
|
||||
window.clearTimeout(timeout);
|
||||
timeout = window.setTimeout(laterCall, wait);
|
||||
|
||||
Reference in New Issue
Block a user