Skip to main content

Conditional Types

Distributive Conditional Types

0:00
LearnStep 1/2

Distribution Over Unions

Distributive Behavior

Conditional types distribute over union types:

typescript

Distribution Only Happens When:

  • The checked type is a naked type parameter
  • The type parameter is in the extends clause

Preventing Distribution

typescript

Practical Example

typescript