编写一个基本通用的 tsconfig.json 配置文件

tsconfig.json

{
  "compilerOptions": {
    "target": "ESNEXT",
    "lib": ["DOM", "ESNEXT"],
    "module": "commonjs",
    "sourceMap": true,
    "outDir": "./dist",
    "moduleResolution": "node",
    "removeComments": true,
    "noImplicitAny": true,
    "strictNullChecks": true,
    "strictFunctionTypes": true,
    "noImplicitThis": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "resolveJsonModule": true,
    "baseUrl": "."
  },
  "exclude": ["node_modules"],
  "include": ["src"]
}

posted on 2021-09-09 10:23  aisowe  阅读(95)  评论(0编辑  收藏  举报

导航