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