-
Notifications
You must be signed in to change notification settings - Fork 0
/
tsconfig.json
executable file
·53 lines (53 loc) · 1.54 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": {
"target": "es2017",
"module": "commonjs",
"removeComments": false,
"preserveConstEnums": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"noImplicitAny": false,
"outDir": "lib",
"noUnusedParameters": true,
"noUnusedLocals": false,
// 允许从没有设置默认导出的模块中默认导入。这并不影响代码的输出,仅为了类型检查。
"allowSyntheticDefaultImports": true,
// 用来指定编译时是否生成.map文件
"sourceMap": true,
// 允许编译JS
"allowJs": true,
/* 是否检测JS的语法 */
"checkJs": false,
// null类型检测,const teacher: string = null;会报错
"strictNullChecks": true,
// 对函数参数进行严格逆变比较
"strictFunctionTypes": true,
// 严格检查bind call apply
"strictBindCallApply": true,
// 此规则将验证构造函数内部初始化前后已定义的属性。
"strictPropertyInitialization": true,
// 不允许对同一个文件使用不一致格式的引用
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"rootDir": ".",
"paths": {
"@/*": ["./src/*"],
"@/package": ["./package.json"],
"@/config": ["./config/index.js"]
},
"jsx": "preserve",
"jsxFactory": "React.createElement",
"typeRoots": ["node_modules/@types"]
},
"exclude": [
"__tests__",
"node_modules",
"dist",
"tests",
"jest",
"lib",
"**/*.test.ts",
"**/*.spec.ts"
],
"compileOnSave": false
}