tsconfig.json 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {
  2. // 编译ts:tsc 文件名称
  3. // 编译全部ts:tsc
  4. // 匹配文件入口
  5. // ** 任意文件目录
  6. // * 任意文件
  7. "include": [
  8. "./src/**/*"
  9. ],
  10. // // 匹配文件出口
  11. // "exclude": [
  12. // // "./src/**/*"
  13. // ],
  14. // "extends": 继承
  15. // "files": [ 单独文件
  16. // './src/a.ts',
  17. // ]
  18. // 编译选项
  19. "compilerOptions": {
  20. // 指定ts编译的版本
  21. // 有效值: "es3", "es5", "es6", "es2015", "es2016", "es2017",
  22. // "es2018", "es2019", "es2020", "es2021", "es2022", "es2023",
  23. // "es2024", "esnext"
  24. "target": "ES2015",
  25. // 模块化
  26. // 'none', 'commonjs', 'amd', 'system', 'umd', 'es6',
  27. // 'es2015', 'es2020', 'es2022',
  28. // 'esnext', 'node16', 'node18', 'nodenext', 'preserve
  29. "module": "amd",
  30. // lib 规定ts可以使用什么库
  31. // "lib": ["dom"],
  32. // 指定编译后文件所在目录
  33. "outDir": "./dist",
  34. // 指定所有文件编译后的合并文件
  35. // "outFile": "./dist/app.js",
  36. // 允许编译js文件
  37. "allowJs": true,
  38. // 检查js是否存在报错
  39. "checkJs": true,
  40. // 移除注释
  41. "removeComments": true,
  42. // 是否允许错误文件编译
  43. // "noEmitOnError": true,
  44. // 不允许数据的默认类型是any
  45. "noImplicitAny": true
  46. }
  47. }