Skip to content

Commit c0f28e4

Browse files
committed
build: 添加 Node 类型声明
- 在 tsconfig.json 文件中添加 "node" 到 "types" 数组 - 这样可以引入 Node.js 的类型声明,提高类型检查的准确性
1 parent 72c5be2 commit c0f28e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"forceConsistentCasingInFileNames": true,
1919

2020
"lib": ["ES2023", "DOM"],
21-
"types": [],
21+
"types": ["node"],
2222
"plugins": []
2323
},
2424
"include": ["src", "test", "*.ts", "*.mts"]

0 commit comments

Comments
 (0)