Type Aliases and Interfaces
Name your own types with type and interface, extend and combine shapes, understand structural typing, and model dictionaries with index signatures and Record.
Until now you used the types that come with the language: string, number, arrays and plain objects. Real programs have their own ideas: a user, a point on a map, an order. This phase teaches the two tools TypeScript gives you to give those ideas a name: type aliases and interface declarations.
You'll learn how to describe object shapes with optional and read-only members, how to build big shapes out of small ones with extends and &, and when to choose type or interface. Then comes the idea that explains most of TypeScript's behaviour, structural typing: the checker compares what a value looks like, not what it is called.
The phase ends with index signatures and Record, the tools for dictionaries where you don't know the keys in advance, including a real runtime trap ("constructor" as a key) that the checker cannot see.
Practise this phase
Hands-on exercises: write the code, see your page live, and press Check to have it tested automatically.