TypeScript Edge Cases
Type system deep dives and inference gotchas
Start Here
Essential reads to understand the key concepts and patterns.
TypeScript's satisfies Operator: Validate Without Widening
satisfies validates without widening. Unlike type annotations, it preserves literal types and enables better narrowing downstream.
TypeScript Distributive Conditional Types: The Union Distribution Rule
T extends U ? X : Y behaves completely differently when T is a union—TypeScript distributes the conditional over each member. Master this rule to unlock advanced utility types.
TypeScript const Type Parameters
The const modifier on generics preserves literal types instead of widening—making type inference match your intent.
TypeScript infer: Advanced Extraction Patterns
Master TypeScript's infer keyword for nested type extraction, variance-aware inference, and recursive unwrapping patterns.
TypeScript NoInfer: Controlling Generic Inference
NoInfer blocks type inference from specific positions. Use it when secondary parameters should match the inferred type, not influence it.
More Articles
TypeScript 5.5 Inferred Type Predicates: When Inference Works (and Doesn't)
TypeScript 5.5 auto-infers type predicates from function bodies — but truthiness checks, multi-return, and parameter mutation block inference.
TypeScript Mapped Type Modifiers: When Inference Breaks
How TypeScript infers +readonly and -optional in mapped types—and when inference silently breaks
TypeScript Template Literal Types: When Clever Types Explode
Template literal types compose beautifully—until they explode. Understand instantiation depth, Cartesian products, and recursive limits to avoid TS2589.
TypeScript Performance: Recursive Types & Build Times
Deeply nested recursive types crash the compiler—learn to optimize with interface caching and tail recursion