-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtsconfig.json
60 lines (58 loc) · 1.96 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
{
"compilerOptions": {
"baseUrl": ".",
"rootDir": ".",
// "outDir": "lib-es",
// "module": "commonjs",
// "target": "es5",
"lib": ["esnext", "dom"],
"target": "esnext",
"sourceMap": true,
"allowJs": true,
// "jsx": "react",
"moduleResolution": "node",
// "removeComments": true,
// "rootDir": "src",
"forceConsistentCasingInFileNames": false,
"importHelpers": true,
"experimentalDecorators": true,
"esModuleInterop": true,
"strict": true,
"resolveJsonModule": true,
// "incremental": true // 增量编译tsc,除第一次编译全部之外,其余时候只编译有改动部分,但不会删除掉改名前的文件和d.ts
// "allowSyntheticDefaultImports": true,
"paths": {
"@mxssfd/*": ["packages/*/src"]
},
"suppressImplicitAnyIndexErrors": false,
"alwaysStrict": true,
"strictPropertyInitialization": true,
"strictBindCallApply": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"noImplicitAny": true,
"strictNullChecks": true,
"useUnknownInCatchVariables": true,
"noUnusedLocals": true,
// 开启了在函数未使用的参数前要加上'_',模版类不能开,否则意思就不对了
"noUnusedParameters": true,
// 开了以后 ?:type 后面都要加上一个|undefined, 有点多此一举
"exactOptionalPropertyTypes": true,
"noImplicitReturns": true,
// "noFallthroughCasesInSwitch": true,
// 类型中的任何未声明字段添加undefined
// 如果设置了[propName: string]: string;获取任意key都时string|undefined
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
// 对象未明确定义的字段要使用['key']获取或赋值
"noPropertyAccessFromIndexSignature": true,
"allowUnusedLabels": false,
"allowUnreachableCode": false
},
"include": [
"packages/*/src",
"packages/*/__tests__",
"packages/*/__test__",
"/test/*/*.ts"
],
}