-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsconfig.json
More file actions
61 lines (56 loc) · 2.37 KB
/
tsconfig.json
File metadata and controls
61 lines (56 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
"compilerOptions": {
// 基础配置
"target": "ES2022", // 目标JavaScript版本
"module": "ESNext", // 模块系统
"moduleResolution": "Node", // 模块解析策略
"lib": ["ES2022"], // 包含的库文件
// 输出配置
"outDir": "./dist", // 输出目录
"rootDir": "./", // 项目根目录
"declaration": true, // 生成.d.ts文件
"declarationMap": true, // 生成声明文件映射
"sourceMap": true, // 生成源码映射
// 模块配置
"esModuleInterop": true, // 启用ES模块互操作
"allowSyntheticDefaultImports": true, // 允许合成默认导入
"forceConsistentCasingInFileNames": true, // 强制文件名大小写一致
"allowImportingTsExtensions": false, // 不允许导入.ts扩展名
// 类型检查
"strict": true, // 启用严格模式
"noImplicitAny": false, // 暂时允许隐式any以完成迁移
"strictNullChecks": true, // 严格空值检查
"strictNullChecks": true, // 严格空值检查
"strictFunctionTypes": true, // 严格函数类型检查
"noImplicitReturns": true, // 不允许隐式返回
"noImplicitThis": true, // 不允许隐式this
"noUnusedLocals": false, // 允许未使用的局部变量(游戏开发中常见)
"noUnusedParameters": false, // 允许未使用的参数
// 高级配置
"skipLibCheck": true, // 跳过库文件检查
"resolveJsonModule": true, // 解析JSON模块
"experimentalDecorators": true, // 启用装饰器
"emitDecoratorMetadata": true, // 发出装饰器元数据
// 路径映射
"baseUrl": "./"
},
"include": [
"src/**/*",
"tests/**/*",
"examples/**/*"
],
"exclude": [
"node_modules",
"dist",
"coverage",
"**/*.test.js",
"**/*.spec.js"
],
"ts-node": {
"esm": true,
"compilerOptions": {
"module": "ESNext",
"target": "ES2022"
}
}
}