Variables, Data Types, Interfaces, Type Aliases and Generics
Learn Variables, Data Types, Interfaces, Type Aliases and Generics (Phase 2 · TypeScript Fundamentals (Essential), Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Typed variables • TypeScript is JavaScript plus static types , checked at compile time and erased in the output. Angular is written in it, so you cannot avoid it. For a Java developer it feels familiar. • Declare with const and let ; annotate with : type or let inference work. Types: string , number (no int/double split), boolean , bigint , null , undefined , arrays ( string[] ), tuples, enum , unknown (safe), any (avoid), void , never .