🟦 TypeScript Tooling & tsconfig.json

TypeScript's tooling helps you configure the compiler and your project via tsconfig.json, so your code compiles exactly how you want it.

📁 What is tsconfig.json?

This file tells the TypeScript compiler (tsc) how to compile your project — what files to include, target JavaScript version, module system, and more.

📝 Sample tsconfig.json

💡 Tip: Run tsc --init to auto-generate a tsconfig.json with defaults.

🔧 Key Compiler Options

📦 Quick Usage

# Initialize tsconfig.json
tsc --init

# Compile your project based on tsconfig.json
tsc

# Compile and watch for changes
tsc --watch
  

🔍 Integrating with Node.js and Bundlers

Use esModuleInterop and module options for smooth interop with Node.js and bundlers like Webpack or Rollup.

📂 Folder Structure Example

my-project/
├── src/
│   └── index.ts
├── dist/
│   └── index.js
├── tsconfig.json
└── package.json