What is 'Type Narrowing' in TypeScript?

preview_player
Показать описание
When working with TypeScript, you have to understand type narrowing. This is the process of taking a wide type that could have many possible type variations and writing code that narrows that type until you know exactly what type you're dealing with.
Рекомендации по теме
Комментарии
Автор

Maybe you should use continue ? In for loop, good video btw

karshten
Автор

Why is it called "Type Narrowing" ?

vd_rlty