mirror of
https://github.com/vastsa/FileCodeBoxFronted.git
synced 2026-11-24 21:58:01 +08:00
fix: use ReturnType for setTimeout/setInterval to fix TS errors
This commit is contained in:
1 parent
b7c6dc6f6d
commit
b38f7c7ba3
2 files changed
+2
-2
No files matched your search
@@ -69,7 +69,7 @@ const alertIcons = {
|
||||
info: Info
|
||||
}
|
||||
|
||||
let intervalId: number
|
||||
let intervalId: ReturnType<typeof setInterval>
|
||||
|
||||
onMounted(() => {
|
||||
intervalId = setInterval(() => {
|
||||
|
||||
+1
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user