What it adds over JavaScript
TypeScript is a superset of JavaScript — all valid JS is valid TS. It adds a static type system that catches errors at compile time instead of runtime.
The compiler (tsc) strips all types and emits plain JS. Types exist only during development — zero runtime cost.
Key benefits: catch typos and wrong types before running code, better IDE autocomplete and refactoring, self-documenting code, safer large-scale refactors.
TS doesn't make JS safer at runtime — it only helps during development. Bad data from an API can still break things.