-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsconfig.json
62 lines (62 loc) · 1.86 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
54
55
56
57
58
59
60
61
62
{
"compilerOptions": {
// 允许从没有设置默认导出的模块中默认导入。这并不影响代码的显示,仅为了类型检查
"allowSyntheticDefaultImports": true,
// 输出目录
"outDir": "./dist/",
// 是否打开源码映射
"sourceMap": true,
// 是否生合并sourcemaps文件,默认单个
// "inlineSourceMap": true,
// 将代码与sourcemaps生成到一个文件中,要求同时设置了
"inlineSources": true,
// 是否启用严格模式
"strict": true,
// 不允许隐式的 any 类型
/// "noImplicitAny": true,
// 不允许this为any类型
// "noImplicitThis": true,
// alwaysStrict
// "alwaysStrict": true,
// null undefined 模式
// "strictNullChecks": true,
// 不允许不是函数的所有返回路径都有返回值
"noImplicitReturns": true,
// 生成模块的规范
"module": "es6",
// 编译js的版本
"target": "es5",
// jsx文件类型
"jsx": "react",
// 允许编译javascript文件
"allowJs": false,
// 不报告执行不到的代码错误
"allowUnreachableCode": false,
// 不报告未使用的标签错误
"allowUnusedLabels": false,
// 若有未使用的局部变量则抛错
"noUnusedLocals": true,
// 若有未使用的参数则抛错
"noUnusedParameters": true,
// 不允许switch的case语句贯穿
"noFallthroughCasesInSwitch": true,
// 启用装饰器
"experimentalDecorators": true,
// 删除注释
"removeComments": true,
// 给错误和消息设置样式,使用颜色和上下文
// 要包含的类型声明文件名列表
// "types": [],
// 要包含的类型声明文件路径列表
// typeRoots: []
"pretty": true
},
// 所要编译的文件
// "files": [],
"include": [
"./src/**/*.ts"
],
"exclude": [
"node_modules"
]
}