fix: use ReturnType for setTimeout/setInterval to fix TS errors

This commit is contained in:
复语 committed 2026-05-09 17:55:38 +08:00
1 parent b7c6dc6f6d
commit b38f7c7ba3
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -114,7 +114,7 @@ export function debounce<T extends (...args: unknown[]) => unknown>(
func: T,
wait: number
): (...args: Parameters<T>) => void {
let timeout: number | null = null
let timeout: ReturnType<typeof setTimeout> | null = null
return (...args: Parameters<T>) => {
if (timeout) {