あなたがバックエンドのために必要とする唯一のtsconfig


ここでは、説明をスクロールダウンペーストをコピーすることができます設定です.
{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "outDir": "./dist",
    "rootDir": "./src",
    "strict": true,
    "noImplicitAny": true,
    "strictNullChecks": true,
    "strictFunctionTypes": true,
    "noImplicitThis": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noImplicitReturns": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true
  },
  "include": ["src/**/*"],
  "exclude": ["**/*.test.ts"]
}

解説


それは銃弾点を通過するより簡単ですので、設定内で説明をコメント.
{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",

  `dist` is where your transpired code go, 
  in your CD you only need to copy the `dist` folder
  to your server along with package.json
  to install `PROD` dependencies.
    "outDir": "./dist",

  src is the folder for your TS code
    "rootDir": "./src",

  Strict checks below, which will help you in the long run 
    "strict": true,
    "noImplicitAny": true,
    "strictNullChecks": true,
    "strictFunctionTypes": true,
    "noImplicitThis": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noImplicitReturns": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true


 Decorators, one of the best features of Typescript.
 most of the awesome frameworks use this, 
 like NestJs, TypeOrm, ClassValidator, 
 RoutingControllers, etc...
   "emitDecoratorMetadata": true,
   "experimentalDecorators": true,
  },

Includes the files under `src` directory
  "include": ["src/**/*"],

Excludes the tests, provide a `regex` 
for your test file pattern. 
Tests are run as TS files before transpiling, 
we don't need tests after the transpiration.
  "exclude": ["**/*.test.ts"]
}