Nothing Generic About It
summary
Explains how generics actually behave: identity functions and constrained generics, map types that implement Partial/Pick under the hood, and conditional types with infer to unwrap a Promise used to extract argument and prop tuples. Shows runtime-plus-type patterns: tight narrowing, using unknown vs any to avoid turning off the checker, and a small assertExhaustive that makes enums exhaustive technique that produces compiler errors when cases are added. Includes React prop and Redux slice examples and HOC/currying notes and the practical limits of TypeScript.
AI-written summary · about
chapters (13)
- 0:00Start
- 14:58HOW DO WE DETERMINE MORE ADVANCED TYPES?
- 15:09DYNAMIC CHECKS GIVE US INFORMATION ABOUT VALUES AT RUN- TIME
- 15:37STRUCTURALLY TYPED
- 16:35WE CAN USE THOSE STRUCTURAL TYPES TO DERIVE OTHER TYPES
- 17:11UNION TYPES
- 19:34TRANSITIVE PROPERTIES
- 21:31GENERICS ARE LIKE PASSING A TYPE AS AN ARGUMENT
- 22:36REAL WORLD GENERICS
- 22:55CONSTRAINTS
- 23:39INDEX IN THE TYPE LAYER
- 29:27INFERENCE TYPES
- 29:46USE NEVER TO TELL TYPESCRIPT SOMETHING IS BROKEN








