|
@@ -1,23 +1,33 @@
|
|
{
|
|
{
|
|
|
|
+ "compileOnSave": true,
|
|
"compilerOptions": {
|
|
"compilerOptions": {
|
|
"outDir": "./dist",
|
|
"outDir": "./dist",
|
|
- "allowJs": true,
|
|
|
|
- "target": "ES5",
|
|
|
|
|
|
+ "target": "es2017",
|
|
|
|
+ "module": "commonjs", // 采用commonjs的模块风格
|
|
"strict": true, // 启用所有严格类型检查选项
|
|
"strict": true, // 启用所有严格类型检查选项
|
|
|
|
+ "noImplicitAny": false, // 隐式any检查
|
|
|
|
+ "allowJs": true,
|
|
"alwaysStrict": true, // 以严格模式检查每个模块,并在每个文件里加入 'use strict'
|
|
"alwaysStrict": true, // 以严格模式检查每个模块,并在每个文件里加入 'use strict'
|
|
"noImplicitReturns": true, // 函数末尾返回值
|
|
"noImplicitReturns": true, // 函数末尾返回值
|
|
"noFallthroughCasesInSwitch": true, // switch case直接break
|
|
"noFallthroughCasesInSwitch": true, // switch case直接break
|
|
"allowUnreachableCode": true, // 未执行代码
|
|
"allowUnreachableCode": true, // 未执行代码
|
|
"allowUnusedLabels": true, // 未执行标签
|
|
"allowUnusedLabels": true, // 未执行标签
|
|
"strictNullChecks": true, // 空检查
|
|
"strictNullChecks": true, // 空检查
|
|
- "noImplicitAny": false, // 隐式any检查
|
|
|
|
"checkJs": true, // 检查js错误
|
|
"checkJs": true, // 检查js错误
|
|
"declaration": true, // 生成相应的 '.d.ts' 文件
|
|
"declaration": true, // 生成相应的 '.d.ts' 文件
|
|
- "sourceMap": true, // 生成相应的 '.map' 文件
|
|
|
|
"removeComments": true, // 删除编译后的所有的注释
|
|
"removeComments": true, // 删除编译后的所有的注释
|
|
"importHelpers": true, // 从 tslib 导入辅助工具函数
|
|
"importHelpers": true, // 从 tslib 导入辅助工具函数
|
|
"moduleResolution": "node", // 选择模块解析策略
|
|
"moduleResolution": "node", // 选择模块解析策略
|
|
- "module": "commonjs" // 采用commonjs的模块风格
|
|
|
|
|
|
+ "experimentalDecorators": true,
|
|
|
|
+ "emitDecoratorMetadata": true,
|
|
|
|
+ "charset": "utf8",
|
|
|
|
+ "pretty": true,
|
|
|
|
+ "noUnusedLocals": true,
|
|
|
|
+ "noUnusedParameters": true,
|
|
|
|
+ "inlineSourceMap": true,
|
|
|
|
+ "skipLibCheck": true,
|
|
|
|
+ "skipDefaultLibCheck": true,
|
|
|
|
+ "esModuleInterop": true
|
|
},
|
|
},
|
|
"include": [
|
|
"include": [
|
|
"./src"
|
|
"./src"
|