diff --git a/packages/vee-validate/src/utils/common.ts b/packages/vee-validate/src/utils/common.ts index 848cea25c..45ee054e1 100644 --- a/packages/vee-validate/src/utils/common.ts +++ b/packages/vee-validate/src/utils/common.ts @@ -218,10 +218,11 @@ export function debounceAsync Promise, return function (...args: Parameters) { // Run the function after a certain amount of time if (timer) { - window.clearTimeout(timer); + clearTimeout(timer); } - timer = window.setTimeout(() => { + // @ts-expect-error timer is a number + timer = setTimeout(() => { // Get the result of the inner function, then apply it to the resolve function of // each promise that has been created since the last time the inner function was run const result = inner(...(args as any));