// eslint-disable-next-line @typescript-eslint/no-explicit-any export function debounce void>( func: F, waitFor: number, ): (...args: Parameters) => void { let timeoutId: number; return (...args: Parameters) => { clearTimeout(timeoutId); timeoutId = window.setTimeout(() => func(...args), waitFor); }; }