Overview of TypeScript
TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. Key characteristics include:
- Compilation: TS cannot run directly in browsers or Node.js (except Deno); it must be compiled to JS.
- Static Typing: Unlike JS's dynamic typing, TS requires variables to have determined types at development time, catching type errors before execution.
- Superset: TS supports all JavaScript syntax and adds additional features, meaning all valid JS code is valid TS code.