Fix eslint errors

This commit is contained in:
Gregory Schier committed 2023-03-11 23:29:25 -08:00
1 parent f846fa8dbc
commit 971cd02142
15 files changed
+64 -87

No files matched your search

+4 -2
View File
@@ -1,6 +1,8 @@
export function debounce(fn: (...args: any[]) => any, delay: number) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function debounce(fn: (...args: any[]) => void, delay: number) {
let timer: ReturnType<typeof setTimeout>;
const result = function (...args: Parameters<typeof fn>) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const result = function (...args: any[]) {
clearTimeout(timer);
timer = setTimeout(() => fn(...args), delay);
};