|
@@ -19,21 +19,38 @@
|
|
|
// 继承 extends
|
|
|
// 文件 files
|
|
|
"compilerOptions": {
|
|
|
+ "moduleResolution": "Node",
|
|
|
// 规定ts转js使用哪个js的版本
|
|
|
// 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'es2021', 'es2022', 'es2023', 'es2024', 'esnext'.
|
|
|
"target": "ES2015",
|
|
|
// 模块 "CommonJS", "AMD", "System", "UMD", "ES6", "ES2015", "ES2020", "ESNext", "None", "ES2022", "Node16", "Node18", "NodeNext", "Preserve"
|
|
|
- "module": "System",
|
|
|
+ "module": "ES2015",
|
|
|
// lib 规定允许使用什么库
|
|
|
"lib": ["dom"],
|
|
|
// 规定将编译后的文件具体放到哪个位置
|
|
|
"outDir": "./dist",
|
|
|
// 规定将编译后的文件具体放到哪一个文件下
|
|
|
- "outFile": "./dist/hi",
|
|
|
+ // "outFile": "./dist/hi",
|
|
|
// 移除所有的注释
|
|
|
"removeComments": true,
|
|
|
// 规定文件是否允许报错编译
|
|
|
- "noEmitOnError": false
|
|
|
+ "noEmitOnError": false,
|
|
|
+ // 允许编译js文件
|
|
|
+ // "allowJs": true,
|
|
|
+ // // 检查js文件是否符合规范
|
|
|
+ // "checkJs": true,
|
|
|
+ // 规定文件是否允许被编译
|
|
|
+ "noEmit": false,
|
|
|
+ // 开启严格模式
|
|
|
+ // "strict": true
|
|
|
+ // 不允许默认的数据类型是any
|
|
|
+ // "noImplicitAny": true,
|
|
|
+ // // 编译后的文件是否按照严格模式
|
|
|
+ // "alwaysStrict": true,
|
|
|
+ // // 检查是否为空
|
|
|
+ // "strictNullChecks": true,
|
|
|
+ // // 规定是否允许使用this
|
|
|
+ // "noImplicitThis": true
|
|
|
|
|
|
|
|
|
}
|