What TypeScript Adds to JavaScript
TypeScript is a superset of JavaScript that adds optional static types, compiled ("transpiled") down to plain JavaScript before it runs. The compiler catches type mismatches — like passing a string where a number is expected — before your code ever runs, instead of failing at runtime.
let age: number = 29;
let name: string = "Ada";
let isActive: boolean = true;
// age = "twenty-nine"; // Compile error: string is not assignable to number