Visit complete TypeScript roadmap

← Back to Topics List

tsconfig.json

tsconfig.json is a configuration file in TypeScript that specifies the compiler options for building your project. It helps the TypeScript compiler understand the structure of your project and how it should be compiled to JavaScript. Some common options include:

  • target: the version of JavaScript to compile to.
  • module: the module system to use.
  • strict: enables/disables strict type checking.
  • outDir: the directory to output the compiled JavaScript files.
  • rootDir: the root directory of the TypeScript files.
  • include: an array of file/directory patterns to include in the compilation.
  • exclude: an array of file/directory patterns to exclude from the compilation.

Given below is the sample tsconfig.json file:

{
  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "strict": true,
    "outDir": "./dist",
    "rootDir": "./src",
    "exclude": ["node_modules"]
  },
  "include": ["src"]
}

Learn more from the following links:

Community

roadmap.sh is the 6th most starred project on GitHub and is visited by hundreds of thousands of developers every month.

Roadmaps Best Practices Guides Videos Store YouTube

roadmap.sh by Kamran Ahmed

Community created roadmaps, articles, resources and journeys to help you choose your path and grow in your career.

© roadmap.sh · FAQs · Terms · Privacy

ThewNewStack

The leading DevOps resource for Kubernetes, cloud-native computing, and the latest in at-scale development, deployment, and management.