What you’ll learn
- Chapter 1Why TypeScript? – Types and the compiler.
Types & compiler - Chapter 2Primitive types & inference – string, number, boolean – and when TS thinks along by itself.
Primitive types - Chapter 3Arrays, tuples & object types – Types for lists and structures.
Typing arrays & functions - Chapter 4type & interface – Defining your own object types.
Interfaces - Chapter 5Your code workshop – Connect what you have learned and discover a new building block.
Several allowed types - Chapter 6Workshop: understand and build it yourself – Practise new building blocks with short explanations and your own programs.
Union: one of several types · Narrowing: limiting the type · Boss: a typed learning progress - Chapter 7New tools for your own ideas – Understand new concepts, fill them in and use them yourself.
Generics: a type as a placeholder · readonly: data for reading only · Discriminated union: two result shapes - Chapter 8Level up: your next practice chapter – Understand four new building blocks in small steps and use them yourself.
Record: values under fixed keys · keyof: valid property names · Tuples: two values with a fixed role · unknown: check first, then use - Chapter 9Master chapter: how real programs are built – Five building blocks from real projects – explained, connected, filled in and written by you.
Optional properties with ? · Function types: a calculation as a parameter · Partial: changing only some properties · Type guards with “is” · as const: fixed values as a type - Chapter 10Project tools: understand and apply – Eight more building blocks with explanation pages and four exercises per lesson.
Typing named values with Record · Offering a list as unchangeable · Describing fixed positions with a tuple · Shrinking a data model with Pick · Telling results apart by a discriminator · A generic function keeps element types · Narrowing unknown data before using it · Checking a shape with satisfies - Chapter 11Union & intersection types – Defining allowed values, combining types and telling them apart safely.
Literal types: only allowed values · Intersection: combining types with & · Telling apart with in · never: checked completely · Boss: processing order status safely - Chapter 12Generics – Blueprints with placeholders: interfaces, functions and classes for many types.
Generic interfaces: Box<T> · Constraints with extends · Reading safely with K extends keyof T · Generic classes: a stack · Boss: a generic store - Chapter 13Narrowing & type guards – Narrowing types down deliberately.
typeof: text or number? · Array.isArray: one or many? · instanceof: handling errors safely · Missing values: ruling out undefined · Boss: evaluating every input safely - Chapter 14Utility types – Ready-made type tools: Omit, Required, Readonly, ReturnType and combinations.
Omit: leaving out properties · Required: everything has to be there · Readonly<T>: read only · ReturnType: taking over the result type · Boss: types for a course API - Chapter 15Async & API types – Typing promises and data from APIs.
Promise<T>: what comes back later? · Types for API responses · Promise.all with types · A result type instead of exceptions · Boss: a typed loader - Chapter 16tsconfig & strict mode – Configuring projects properly.
strict: the strict mode · noImplicitAny: every parameter needs a type · find can return undefined · The exclamation mark ! – only for a good reason · Boss: making code fit for strict - Chapter 17TypeScript + JSON: processing data safely – JSON arrives from the web as text, TypeScript gives it shape: interfaces, unknown with type guards, response variants and evaluations.
JSON gets a type: interface · Check first, then trust: unknown and type guards · Responses with variants: union with a tag · Summarising data: Record · Boss: evaluating an API response
Final project: Typed task manager
A small task manager with clean types and validation.
How it works
Every lesson starts with short explanation pages. Then you practise with multiple-choice questions, fill-in-the-gap tasks, putting code in order and writing your own code – with hints and instant feedback. Free, without ads, on phone, tablet and PC.