Classes and Object-Oriented TypeScript
Typed classes, private and protected members, inheritance and override, abstract classes, implements, static members, accessors, this types and decorators.
A class is a blueprint for making many objects that share the same fields and behaviour. JavaScript has had classes since 2015; TypeScript adds the part JavaScript cannot have: a checker that knows exactly which fields each object has, which are secret, and which methods a child class may replace.
This phase goes from the first typed class to the full toolbox: constructors and strictPropertyInitialization, public, private, protected and #private (and what each really does at runtime), readonly and parameter properties, extends and override, abstract classes, implements, static members, getters and setters, the accessor keyword, this types for fluent APIs, and decorators.
Every example is checked by the real compiler in your browser. Predict the error, then look at the Types panel; the Console shows what really runs, including the places where TypeScript's rules are only a promise made before the code runs.
Practise this phase
Hands-on exercises: write the code, see your page live, and press Check to have it tested automatically.