Skip to content
New this month 24 fresh C++, C#, F#, JavaScript, TypeScript and Lua courses just landed. Browse new releases Use code WELCOME10 for 10% off your first order · 14-day refund
Web Development Intermediate

TypeScript Intermediate: Generics, Narrowing and Type-Level Design

Design types that make invalid states unrepresentable and errors readable again.

19 students

MH Created by Marcus Hale

  • Last updated August 2026
  • English
  • 11h 46m of material
  • 88 lessons

What you will learn

8 concrete outcomes

Every bullet below is something you will have built, shipped or be able to explain by the time you finish the last lesson.

  • Write generic functions, classes and hooks with constraints, defaults and clean inference
  • Explain variance and fix assignability errors instead of reaching for a cast
  • Use conditional types, mapped types, key remapping, infer and template literal types
  • Model domains with discriminated unions so invalid states cannot be constructed
  • Derive types from Zod schemas rather than maintaining a duplicate definition
  • Type React components properly, including generic and polymorphic components
  • Build an end-to-end typed API client whose contract cannot drift silently
  • Decode long TypeScript errors quickly and test types with expect-type

Course curriculum

8 modules · 88 lessons · 11h 46m of material

14 lessons running 1h 52m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

11 lessons running 1h 28m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

13 lessons running 1h 44m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

14 lessons running 1h 52m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

9 lessons running 1h 10m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

10 lessons running 1h 20m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

11 lessons running 1h 28m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

6 lessons running 48m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

8 modules · 88 lessons

11h 46m total length

Requirements

Short list, and deliberately so. If you meet these you can start today.

  • Working TypeScript knowledge: annotations, interfaces, unions and strict mode
  • Experience with a real TypeScript project, ideally one that fights you occasionally
  • Node 20 or newer with TypeScript 5.4 or later

About this course

Once you are past annotations, TypeScript becomes a design tool. The question stops being how to type this function and becomes how to shape types so that the wrong call does not compile. This course is about that shift, and about the machinery required to pull it off without producing types nobody else can read.

Generics are covered thoroughly: type parameters and inference, constraints, defaults, generic classes and hooks, and the variance rules that explain why a seemingly correct assignment is rejected. Then come the type-level operators that do the real work, conditional types, mapped types, key remapping, template literal types, infer, and the utility types you should stop reimplementing. Discriminated unions get their own module because they solve more real problems than any other single technique.

The applied modules cover validating external data with Zod and deriving types from schemas rather than duplicating them, typing React components including generic components and polymorphic props, building a typed API client whose routes and payloads stay in sync, declaration files, module augmentation, and type-level testing with expect-type. A dedicated module covers reading catastrophic error messages and reducing them to the one line that matters.

Frequently asked questions

Still unsure about something? Write to misteryjj100@gmail.com and a human answers, usually the same working day.

It can, and the course covers it directly: which constructs are expensive, how to measure with the compiler diagnostics flags, and how to simplify a type that has become a performance problem.

No. One module uses React because typed components are a common need, but generics, conditional types and schema-derived types apply to any TypeScript codebase.

Yes, including const type parameters, satisfies and the decorator implementation, each shown in a situation where it genuinely helps.

Checkout is handled on our provider's secure payment page. The moment your payment clears we email your personal access link and access code to the address you used at checkout, and the same link appears in your account library. There is nothing to install and nothing to wait for.

Email misteryjj100@gmail.com within 14 days of your purchase, quote your order number, and we refund the full amount to your original payment method. No form to fill in and no questions about how much of the course you watched.

What students say

No reviews yet

Nobody has reviewed this course yet, so there is no score to show. Buy it, work through it, and your review could be the one that helps the next developer decide.

Your instructor

MH

Marcus Hale

Web engineer and JavaScript educator

  • 259 students taught
  • 12 courses published
  • 4.7 instructor rating
  • JavaScript
  • TypeScript
  • React
  • Node.js

Marcus has shipped front ends for two ad-tech startups and one very large retailer, which taught him more about performance budgets than any blog post could. He teaches JavaScript and TypeScript from the runtime up — event loop first, framework second — then follows the same code through Node on the server side. Every one of his courses ends with a deployed application rather than a folder of exercises. He writes a weekly newsletter on browser performance.

$84 USD

One-time payment · lifetime access

The WisdomCharms dispatch

One useful email a week. No fluff, no spam.

New course releases, discount codes before anyone else, and a short, practical breakdown of one technique — a prompt pattern, a C++ idiom, a TypeScript trick — that you can use the same day.

  • Subscriber-only launch pricing
  • Unsubscribe in one click
  • We never sell your address

By subscribing you agree to our Privacy Policy. Questions? Write to misteryjj100@gmail.com.