TypeScript Associate — Hard
Key points
- Conditional types are used to create a type that transforms a union to an intersection
- The infer keyword is crucial in capturing the resulting type from a conditional type check
- Function parameter contravariance is utilized to achieve the desired conversion
Ready to go further?
Related questions
