diff --git a/src/editor/utils/index.ts b/src/editor/utils/index.ts index ac3de24..e6c9664 100644 --- a/src/editor/utils/index.ts +++ b/src/editor/utils/index.ts @@ -1,11 +1,10 @@ export function debounce(func: Function, delay: number) { let timer: number - return function (...args: any) { + return function (this: any, ...args: any[]) { if (timer) { window.clearTimeout(timer) } timer = window.setTimeout(() => { - // @ts-ignore func.apply(this, args) }, delay) } diff --git a/src/utils/index.ts b/src/utils/index.ts index 90575da..acce137 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,11 +1,10 @@ export function debounce(func: Function, delay: number) { let timer: number - return function (...args: any) { + return function (this: any, ...args: any[]) { if (timer) { window.clearTimeout(timer) } timer = window.setTimeout(() => { - // @ts-ignore func.apply(this, args) }, delay) }