tsconfig.json 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {
  2. "compileOnSave": true,
  3. "compilerOptions": {
  4. "outDir": "./dist",
  5. "target": "es2017",
  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": true, // 生成相应的 '.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. },
  32. "include": [
  33. "./src"
  34. ]
  35. }