When you pass a Union type into a conditional type, TypeScript doesn’t evaluate the union as a whole. It evaluates every single member of the union separately, and combines the results. Learn how this powerful (and sometimes confusing) mechanism powers TypeScript’s standard library.
An in-depth guide to the Extract and Exclude utility types. Understand the fundamental difference between Object manipulation (Pick/Omit) and Union manipulation (Extract/Exclude), extracting by object signature in discriminated unions, and their underlying distributive conditional type mechanics.
An in-depth analysis of Unions and Intersections in TypeScript. Understand how set theory models type relationships ($A \cup B$ vs $A \cap B$), property access rules, property conflict resolution to ’never’, and operator precedence.