-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsconfig.json
53 lines (53 loc) · 1.41 KB
/
tsconfig.json
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
{
"compilerOptions": {
"baseUrl": ".", // 根目录
"target": "esnext", // js版本
"module": "esnext", // 模块系统版本
"strict": true, // 是否严格模式
"jsx": "preserve",
"importHelpers": true,//从 tslib 导入辅助工具函数
"moduleResolution": "node",//如何解析模块
"experimentalDecorators": true,//启用装饰器
"esModuleInterop": true,
"noImplicitAny": false,//在表达式和声明上有隐含的 any类型时报错
"strictPropertyInitialization": false,//所有属性都需要被赋值
"allowSyntheticDefaultImports": true,//允许从没有设置默认导出的模块中默认导入
"sourceMap": true,//生成sourcemap
"strictNullChecks": true,//启用严格null检查
"noUnusedLocals": false,//未使用的变量
"noUnusedParameters": true,//未使用的参数
"allowJs": false,//允许编译 javascript 文件
"types": [
"webpack-env",
"jest"
],
// 模块名或路径映射的列表
"paths": {
"@/*": [
"src/*"
],
"moduleA": [
"src/libs/moduleA"
]
},
// 全局库
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
},
// 需要编译的目录
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
// 排除的目录
"exclude": [
"node_modules"
]
}