Back to the Catalog
typescript
javascript

TypeScript Generics, Inference & Type-Level Programming

12 questions

Two clusters in one quiz: Generics & Inference (when TS infers vs. when you must annotate, extends constraints, defaults, and why an unconstrained <T> leaks unknown) and Type-Level Programming (conditional types, infer, mapped & template-literal types). Read gnarly utility types and predict exactly what they resolve to. Every type-resolution claim was verified by compiling it with tsc 6.0 using Expect<Equal<…>> assertions.