Level 1 graduates, or people who already program a little. A placement quiz tells you where to start.
You'll be able to
Use the full everyday power of the type system, model a domain with types, protect code from bad data, and review TypeScript critically.
Running project
Typed API client. A command-line client for a public web API with validated responses, a disk cache, Result-based errors, and full tests.
Lessons take 20 to 30 minutes, some shorter or longer as the topic needs. Each module ends with a one-page cheat sheet, in its last lesson. Levels 2 and 3 start with a placement quiz, and a glossary covers the whole course.
Modules
18 modules, 76 lessons
M1 · 4 lessonsTypeScript's Own Tools
1.1tsc: --noEmit, --watch, and reading its output
1.2Your editor as a TypeScript tool: hover, go to definition, rename, quick fixes
1.3Reading long, nested type errors
1.4Strict flags beyond strict: what each one catches and which to turn on
Project stepStart the API client: strict flags, plus check and watch scripts.
M2 · 5 lessonsHarder Narrowing Cases
2.1Exhaustiveness checking with never
2.2Type guards (x is T), and when TypeScript infers them for you
2.3Assertion functions (asserts x is T)
2.4instanceof and class-based narrowing
2.5Type assertions (as): when they're justified and why they're risky
Project stepModel the client's commands as a union and handle every case exhaustively.
M3 · 9 lessonsType Operators
3.1Intersection types (&): combining shapes, and how they differ from extends
3.2The wide types: unknown, object, and {}
3.3keyof
3.4The typeof type operator
3.5Indexed access types (T["key"])
3.6as const and types derived from data
3.7The satisfies operator
3.8Index signatures and noUncheckedIndexedAccess
3.9Why Object.keys returns string[]
Project stepDerive command names and option types from one as const config checked with satisfies.
M4 · 4 lessonsGenerics in Practice
4.1Constraints with extends
4.2The K extends keyof T pattern
4.3Default type parameters
4.4Generic classes and containers
Project stepWrite a generic request<T>() helper and a typed cache Cache<K, V>.
M5 · 4 lessonsBuilt-in Utility Types
5.1Partial, Required, Readonly; a missing property vs undefined
5.2Pick, Omit, Record
5.3Exclude, Extract, NonNullable
5.4ReturnType, Parameters, Awaited
Project stepBuild create, update, and summary types from one base type.
M6 · 3 lessonsImmutability and Tuples
6.1readonly arrays and ReadonlyArray<T>
6.2Named, optional, and rest elements in tuples
6.3Updating without mutating: toSorted, with, and structuredClone
Project stepMake settings and cache entries read-only; return new objects instead of changing old ones.
M7 · 5 lessonsDesigning with Types
7.1Making impossible states impossible
7.2Modeling loading, success, and error states
7.3Branded types for IDs and units
7.4Parse, don't validate
7.5When not to add more types
Project stepModel each request as idle, loading, success, or error, and brand the IDs.
M8 · 4 lessonsAdvanced Functions
8.1Function overloads
8.2Typing this, and how methods lose their context
8.3Generic callbacks and higher-order functions
8.4Iterables and generators: function* and Generator<T>
Project stepAdd an overloaded get() and a generator that pages through results.
M9 · 4 lessonsClasses in Depth
9.1implements and abstract
9.2Getters, setters, and static members
9.3protected, and why modern code avoids parameter properties
9.4Composition vs inheritance
Project stepHide HTTP behind an interface with two classes: a real client and a fake one.
M10 · 5 lessonsErrors and Concurrent Code
10.1Custom error classes and cause
10.2The Result pattern instead of exceptions
10.3Promise.all, allSettled, race, any, and their types
10.4Timeouts and cancellation with AbortController
10.5Async iteration with for await
Project stepReturn Results instead of throwing; add timeouts, cancellation, and parallel requests.
M11 · 5 lessonsData at App Boundaries
11.1Why types don't protect you at runtime
11.2Writing validators by hand with type guards
11.3Typing and validating API responses
11.4Deriving types from validators: the idea behind schema libraries
11.5Typing and validating configuration and environment variables
Project stepValidate every API response with hand-written guards before it enters the app.
M12 · 4 lessonsStandard Library Essentials
12.1Regular expressions: the basics, and typed match results
12.2Intl: formatting numbers, currencies, and dates for any language
12.3Dates and times: Date pitfalls and Temporal
12.4The rarer primitives: bigint and symbol
Project stepFormat prices, dates, and numbers for the user's locale; parse fields with regex.
M13 · 5 lessonsHow TypeScript Finds and Runs Code
13.1tsconfig.json in detail: target, module, rootDir, outDir, lib, types
13.2Module resolution: nodenext or bundler, and how to choose
13.3ESM and CommonJS: what you'll meet in other people's code
13.4Three ways to run TypeScript, and when to use each
13.5Organizing a project: folders, barrel files, and a module's public API
Project stepReorganize the client into folders with a clear public API and build it with tsc.
M14 · 4 lessonsUntyped Code
14.1Libraries without types: declare module
14.2Ambient declarations, global types, and .d.ts files
14.3Namespaces: recognizing an older pattern
14.4OptionalIf you end up in a JavaScript project: allowJs, checkJs, and JSDoc
Project stepAdd a small untyped helper package and describe it with your own .d.ts file.
M15 · 3 lessonsReviewing TypeScript Code
15.1Type-safety smells: any, as, !, @ts-ignore, and a switch that isn't exhaustive
15.2Reading unfamiliar TypeScript
15.3Reviewing AI-generated TypeScript with the same checklist
Project stepReview your own client with the smell checklist and fix what you find.
M16 · 3 lessonsTesting Typed Code
16.1Structuring tests with node:test; typed fixtures and test data builders
16.2Testing asynchronous code
16.3Typed test doubles without a framework
Project stepCover the client with tests, using the fake HTTP class from Module 9.
M17 · 4 lessonsPopular Libraries, Step Two
17.1zod: schemas that become types, compared with your hand-written validators
17.2axios: typed HTTP requests, and why get<User>() is a promise, not a check
17.3ts-pattern: exhaustive pattern matching over unions
17.4vitest: moving your node:test suite to a popular test framework
Project stepReplace hand-written guards with Zod, try axios, and move the tests to Vitest.
M18 · 1 lessonFinal Project
18.1A typed command-line API client: validated responses (by hand, then with Zod), a disk cache, Result-based errors, and full tests
Project stepShip the client: a README, a clean check run, and tests for every core feature.
Not part of the levels. These two modules show where TypeScript is used and which libraries you'll meet. Each lesson explains what a platform, tool, or library is for and shows one short example of where TypeScript helps. The tools themselves are learned separately; this course doesn't teach them in depth.
Bonus A · 15 lessonsTypeScript in the Real WorldPart 1 reads best after Level 2. Its Git lesson, the first of Part 2, builds on Level 1's lessons 15.2 and 15.3: read it any time after Level 1.
Bonus B · 29 lessons · coming soonMust-Have LibrariesA catalog, not a sequence: read any lesson once you've reached the level on its tag. Libraries already taught inside the levels (chalk, commander, date-fns, lodash, zod, axios, ts-pattern, vitest, type-fest, Drizzle or Kysely, tRPC) aren't repeated here.
Practical TypeScript — Level 2 of TypeScript from Zero | DevFox Labs