TypeScript Professional — Hard
Key points
- Covariant is wider due to the relationship between subtypes and supertypes
- Contravariant is narrower as it expects a specific type
- The generic types in TypeScript can have different constraints based on their usage
Ready to go further?
Related questions
