Concept: Type Erasure
Question
What happens to TypeScript type annotations when the code is compiled to JavaScript?
Hint
JavaScript doesn't have a type system — what must happen to types?
Explanation
TypeScript types are erased during compilation — all type annotations, interfaces, and type aliases are removed from the output JavaScript. The compiled JavaScript is plain JS with no type information. This is called 'type erasure'. Enums and classes are exceptions — they compile to real JavaScript objects.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.