Demo mode — data resets on refresh.
Types and Interfaces
Why TypeScript?
The Problem with JavaScript
JavaScript is dynamically typed, which means type errors are only caught at runtime — when users encounter them. TypeScript adds a static type layer that catches errors at compile time.
TypeScript Benefits
TypeScript provides excellent IDE support with autocompletion, inline documentation, and refactoring tools. It makes large codebases manageable by making contracts between functions explicit.
TypeScript is a Superset
Every valid JavaScript file is a valid TypeScript file. You can adopt TypeScript incrementally by renaming .js files to .ts and adding types gradually.
Knowledge Check
1.When does TypeScript catch type errors?
2.Is JavaScript valid TypeScript?