CodeZettaInterview Hub

TypeScript · Conditional Types · Junior · Concept

What is distributivity in conditional types?

Short Interview Answer

Naked T extends U ? X : Y applied to unions distributes over members.

Detailed Explanation

Wrap in [] to disable. Explains Exclude behavior on unions.

Did you know this answer?