mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-30 14:12:07 +02:00
Fix eslint errors
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user