C.W.K.
Stream
Lesson 01 of 05 · published

`tsc` Modes: noEmit, watch, incremental

~7 min · tooling, tsc, modes

Level 0Curious
0 XP0/93 lessons0/23 achievements
0/100 XP to next level100 XP to go0% complete
"tsc isn't one command — it's a Swiss Army knife with several blades."

The modes you'll use most

tsc — full type check + emit. The default. Slowest mode; produces .js output.

tsc --noEmit — type check only. Used for CI 'does it compile?' checks where you don't need .js output (because some other tool produces it). Faster than full compile.

tsc --watch — keeps running, re-checks on file changes. Used during development for fast incremental feedback. Combined with --noEmit, you get continuous type checking.

tsc --incremental — caches type-checking state in .tsbuildinfo. Subsequent runs only re-check what changed. Essential for large projects.

tsc -b / --build — project references build mode. Coordinates multi-package monorepo builds. We cover this in the next lesson.

How real projects use them

The typical setup: tsc --noEmit --incremental in CI for type-only checks, vite or esbuild for actually emitting JS, and tsc --watch --noEmit in development IDE/terminal for continuous feedback. The split is deliberate — let the fast transpiler do the build; let tsc focus on type-checking.

Don't use tsc for emit in modern projects. Vite, esbuild, swc, Bun, Deno are all 10-100x faster at producing JavaScript. Let them. Use tsc only for type-checking, where it has no equivalent.

Code

tsc modes — the common combinations·bash
# Type check only — for CI.
npx tsc --noEmit

# Continuous type checking — terminal pane during development.
npx tsc --watch --noEmit

# Incremental — speeds up successive runs.
npx tsc --noEmit --incremental
# The first run writes .tsbuildinfo;
# subsequent runs only re-check what changed.

# Project references build (next lesson).
npx tsc -b

# Full emit — only if no other build tool.
npx tsc

External links

Exercise

In a small TS project, run tsc --noEmit, then tsc --noEmit --incremental twice. Note the time difference. Now introduce a single-line change in one file and run incremental again — confirm only the changed file is re-checked.
Hint
The first incremental run writes .tsbuildinfo with the full state. The second uses it and is faster. After a change, only the affected files re-check.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.