What does ‘bivariant’ method checking mean and when does TypeScript use it?
Key points
- Bivariant method checking applies to methods defined with shorthand syntax
- It allows both covariant and contravariant checking for assignments
- Bivariant types are different from bivariant method checking
- Function properties with '=>' syntax are checked contravariantly under strictFunctionTypes
Ready to go further?
