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
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

The TypeScript Compiler & tsconf | TypeScript Mastery lesson | BraveProgrammer
  1. Courses
  2. /
  3. TypeScript Mastery

Lesson 2 of 56

·Typescript

The TypeScript Compiler & tsconfig.json

15 minutes

Course progress4%

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.
Make it stickPractice what you've learned1 quiz · 3 practical tests · Optional activities from TypeScript MasteryBrowse activities
Previous lessonCourse Overview & Environment SetupContinue to lesson 3Primitive Types & Type InferenceBack to TypeScript Mastery curriculum