소스 검색

[demo]修复NoticeBar组件中times变量的类型定义,改为使用ReturnType<typeof setInterval>以提高类型安全性。

dufu1991 1 년 전
부모
커밋
bbfddac846
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      packages/stdf/src/lib/components/noticeBar/NoticeBar.svelte

+ 1 - 1
packages/stdf/src/lib/components/noticeBar/NoticeBar.svelte

@@ -57,7 +57,7 @@
 
 	//垂直滚动时的处理
 	//Processing when scrolling vertically
-	let times: NodeJS.Timeout | null = null;
+	let times: ReturnType<typeof setInterval>;
 	let currentIndex = $state(0);
 	let textListVertical = [...textList, textList[0]];
 	let isTransition = $state(true);