TypeScript Deep Dive - how `infer` actually works? What is co-variant & contra-variant? | JSer

preview_player
Показать описание

This video explains 2 things

1. why function parameter position is contra-variant
2. why infer returns union type for co-variant, while intersect for contra-variant positions

Hi I'm a JavaScript engineer who is not good at algorithms,
and currently practicing leetCode & BFE.dev. If you are interested, maybe we can learn together.
Рекомендации по теме
Комментарии
Автор

man you're hilarious 🤣 although I get as confused as you it never crossed my mind to record myself in that state! 😉😁 thanks for the video!

nderezic
Автор

This is very very extremly complicated

victoryosikwemhe