tsconfig.json

{
  // http://www.tslang.cn/docs/handbook/tsconfig-json.html
  "compilerOptions": {
    "outDir": "./bu", // 重定向输出目录
    "target": "es5", // 指定ECMAScript目标版本
    "lib": ["dom", "dom.iterable", "esnext"], // 编译过程中需要引入的库文件的列表。
    "allowJs": true, // 允许编译javascript文件
    "skipLibCheck": true, // 忽略所有的声明文件( *.d.ts)的类型检查。
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true, // 允许从没有设置默认导出的模块中默认导入
    "strict": true, // 启用所有严格类型检查选项
    "forceConsistentCasingInFileNames": true, // 禁止对同一个文件的不一致的引用
    "module": "esnext", // 指定生成哪个模块系统代码
    "moduleResolution": "node", // 决定如何处理模块
    "resolveJsonModule": true, // 包括使用.json扩展名导入的模块。
    "isolatedModules": true, // 将每个文件作为单独的模块
    "noEmit": true, // 不生成输出文件。
    "jsx": "react" // 在 .tsx文件里支持JSX
  },
  "include": ["src"] // 读取所有可识别的src目录下的文件(通过include)
}
原文地址:https://www.cnblogs.com/Running00/p/12655306.html