Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons

© 2026 BraveProgrammer. All rights reserved.

  1. Courses
  2. /
  3. TypeScript Mastery

Lesson 2 of 56 · Typescript

The TypeScript Compiler & tsconfig.json

Duration: 15 minutes

Understanding tsc and tsconfig.json

The TypeScript compiler (tsc) reads tsconfig.json to determine which files to compile and which JavaScript features to target.

Key compilerOptions

OptionDescription
targetECMAScript version of the emitted code (ES2022, ESNext).
moduleModule system (CommonJS, ESNext).
strictEnables all strict type‑checking options (noImplicitAny, strictNullChecks, …).
sourceMapGenerates .map files for debugging.
declarationEmits .d.ts declaration files (useful for libraries).
paths & baseUrlConfigure module aliasing.

Incremental builds

"incremental": true,
"tsBuildInfoFile": "./.tsbuildinfo"

Turns on faster incremental compilation.

Project References (monorepos)

"references": [{ "path": "../shared" }]

Allows one TS project to depend on another’s compiled output.

Try it out:

npx tsc --watch   # recompiles on file changes

Info

Run tsc --init to generate a starter tsconfig.json.

Previous: Course Overview & Environment SetupNext: Primitive Types & Type Inference