TypeScript
A typed superset of JavaScript that compiles to plain JS. It catches whole classes of mistakes before runtime and makes larger codebases easier to navigate.
What it is
TypeScript adds static types, interfaces, and tooling-aware editor support on top of JavaScript. Your build step strips types; browsers and Node still run JavaScript.
Why it matters
Types document intent at the boundary between modules, reduce accidental breakage during refactors, and make autocomplete reliable in complex UIs and APIs.
When to use it
Default to TypeScript for new app work unless you have a strong reason not to. It pays off quickly once multiple files, shared models, or external APIs are involved.
How it fits in the stack
It is a language and compiler layer: it sits alongside your bundler and framework, shaping how you write source code. It does not replace testing, linting, or runtime validation at boundaries like forms and network input.
Common confusion
TypeScript is not a runtime type checker. Types disappear after compile; you still validate untrusted input. It also does not replace a framework or bundler; it works with them.