tsc is a pipeline of five phases, each consuming the previous one's output. In TypeScript 6.0 each phase is one file in src/compiler/; the Go port keeps the design as packages under internal/.

The scanner turns characters into tokens (interface, Item, {), skipping whitespace and comments.
The parser builds an abstract syntax tree (AST) of nodes such as InterfaceDeclaration, recovering from syntax errors so your editor keeps working.
The binder creates a symbol for each declaration, links names to scopes and builds the control-flow graph that narrowing (Narrowing) uses.
The checker computes types lazily, when something asks, and compares them. At 54,434 lines in 6.0, checker.ts holds most of the language.
The emitter erases types, downlevels syntax for older target values and writes JavaScript, declaration files and source maps.
--extendedDiagnostics reports the time spent in each phase:
$ npx tsc --extendedDiagnostics --outDir dist cart.ts | grep -E "Files|Memory used|time"
Files: 83
Memory used: 65514K
Parse time: 0.033s
Bind time: 0.011s
Check time: 0.238s
Emit time: 0.002s
Total time: 0.286sThe 11-line cart.ts pulls in 82 standard library files (lib.es2025.d.ts, lib.dom.d.ts and more), and checking dominates. TypeScript 6.0 needed 0.98 s and 149 MB for the same job. Because checking is the costly phase, TypeScript 7.0 spreads files across parallel checker workers.