Initial commit

This commit is contained in:
Nikolay Pecheniev
2026-02-06 13:19:30 +02:00
commit 008111d2ac
656 changed files with 77415 additions and 0 deletions

15
src/utils/debounce.ts Normal file
View File

@@ -0,0 +1,15 @@
export function debounce<T extends (...args: unknown[]) => void>(
func: T,
wait: number
): (...args: Parameters<T>) => void {
let timeout: NodeJS.Timeout | null = null;
return function (...args: Parameters<T>) {
if (timeout) {
clearTimeout(timeout);
}
timeout = setTimeout(() => {
func(...args);
}, wait);
};
}