tsconfig.json 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {
  2. "compileOnSave": true,
  3. "compilerOptions": {
  4. "outDir": "./dist",
  5. "target": "es2020",
  6. "module": "commonjs", // 采用commonjs的模块风格
  7. "strict": true, // 启用所有严格类型检查选项
  8. "noImplicitAny": false, // 隐式any检查
  9. "allowJs": true,
  10. "alwaysStrict": true, // 以严格模式检查每个模块,并在每个文件里加入 'use strict'
  11. "noImplicitReturns": true, // 函数末尾返回值
  12. "noFallthroughCasesInSwitch": true, // switch case直接break
  13. "allowUnreachableCode": true, // 未执行代码
  14. "allowUnusedLabels": true, // 未执行标签
  15. "strictNullChecks": true, // 空检查
  16. "checkJs": true, // 检查js错误
  17. "declaration": false, // 生成相应的 '.d.ts' 文件
  18. "removeComments": true, // 删除编译后的所有的注释
  19. "importHelpers": true, // 从 tslib 导入辅助工具函数
  20. "moduleResolution": "node", // 选择模块解析策略
  21. "experimentalDecorators": true,
  22. "emitDecoratorMetadata": true,
  23. "charset": "utf8",
  24. "pretty": true,
  25. "noUnusedLocals": true,
  26. "noUnusedParameters": true,
  27. "inlineSourceMap": true,
  28. "skipLibCheck": true,
  29. "skipDefaultLibCheck": true,
  30. "esModuleInterop": true,
  31. "baseUrl": "./src",
  32. "paths": {
  33. "@/*": ["./*"],
  34. "@controllers": ["./controllers"],
  35. "@services": ["./services"],
  36. "@utils/*": ["./utils/*"],
  37. "@config": ["./config"]
  38. }
  39. },
  40. "include": [
  41. "./src"
  42. ]
  43. }