Basic Types and Annotations
Write types on variables, parameters and return values; learn the primitive types, inference, arrays, object shapes, any, unknown, null and undefined.
This phase teaches the small alphabet that every other TypeScript idea is built from: the annotation (: type), the seven primitive types, inference (TypeScript working types out for you), arrays, object shapes, and the two awkward values every language fights with: "anything" and "nothing".
You'll learn when to write a type yourself and when to let TypeScript do it, why any switches the safety net off while unknown keeps it on, and how null and undefined cause the most common crash in JavaScript and how TypeScript stops it.
Every example is checked by the real compiler. Predict the error first, then open the Types panel: it shows exactly the line tsc would print, and the Console shows what the program does when it runs anyway.
Practise this phase
Hands-on exercises: write the code, see your page live, and press Check to have it tested automatically.