TypeScript Professional — Hard
Key points
- This code snippet leverages conditional types to merge intersected object types.
- The `infer` keyword helps capture the type of `O` during the conditional check.
- The resulting type `MergeIntersection` contains all properties from the intersected objects in a flat structure.
Ready to go further?
Related questions
