You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

tsconfig.json 1.7 kB

2 years ago
2 years ago
2 years ago
2 years ago
1234567891011121314151617181920212223242526272829303132
  1. {
  2. "compilerOptions": {
  3. "target": "esnext", // 指定ECMAScript目标版本
  4. "lib": ["dom", "dom.iterable", "esnext"], // 要包含在编译中的库文件列表
  5. "allowJs": true, // 允许编译JavaScript文件
  6. "skipLibCheck": true, // 跳过所有声明文件的类型检查
  7. "esModuleInterop": true, // 禁用命名空间导入(import * as fs from "fs"),并启用CJS/AMD/UMD样式的导入(import fs from "fs")
  8. "allowSyntheticDefaultImports": true, // 允许从没有默认导出的模块进行默认导入
  9. "strict": true, // 启用所有严格类型检查选项
  10. "forceConsistentCasingInFileNames": false, // 允许对同一文件的引用使用不一致的大小写
  11. "module": "esnext", // 指定模块代码生成
  12. "moduleResolution": "node", // 使用Node.js样式解析模块
  13. "isolatedModules": true, // 无条件地为未解析的文件发出导入
  14. "resolveJsonModule": true, // 包含.json扩展名的模块
  15. "noEmit": true, // 不发出输出(即不编译代码,只进行类型检查)
  16. "jsx": "react-jsx", // 在.tsx文件中支持JSX
  17. "sourceMap": true, // 生成相应的.map文件
  18. "declaration": true, // 生成相应的.d.ts文件
  19. "noUnusedLocals": true, // 报告未使用的局部变量错误
  20. "noUnusedParameters": true, // 报告未使用的参数错误
  21. "incremental": true, // 通过读写磁盘上的文件来启用增量编译
  22. "noFallthroughCasesInSwitch": true, // 报告switch语句中的fallthrough案例错误
  23. "baseUrl": "./",
  24. "paths": {
  25. "@/*": ["src/*"],
  26. "@@/*": ["src/.umi/*"]
  27. }
  28. },
  29. "include": [
  30. "src/**/*" // *** TypeScript应该检查的文件 ***
  31. ]
  32. }