/
tsconfig.json
32 lines (32 loc) · 1.16 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
{
"compilerOptions": {
"target": "ES5",
"module": "ESNext",
"lib": ["DOM","ESNext"],
// 开启所有严格的类型检查
"strict": true,
// 不允许隐式的any类型
"noImplicitAny": true,
// 不允许this有隐式的any类型
"noImplicitThis": true,
// 检查只声明、未使用的局部变量(只提示不报错)
"noUnusedLocals": true,
// 检查未使用的函数参数(只提示不报错)
"noUnusedParameters": true,
// 允许export=导出,由import from 导入
"esModuleInterop": true,
// 不允许把null、undefined赋值给其他类型的变量
"strictNullChecks": true,
"strictPropertyInitialization": true,
// 禁止对同一个文件的不一致的引用。
"forceConsistentCasingInFileNames": true,
// 生成声明文件,开启后会自动生成声明文件
"declaration": true,
"declarationDir": "dist/types",
// 模块解析策略,ts默认用node的解析策略,即相对的方式导入
"moduleResolution": "node",
"resolveJsonModule": true,
},
"include": ["src","tests", "tests/setupTests.ts"],
"exclude": ["node_modules", "dist", "scripts"]
}