type narrowing vs type casting

preview_player
Показать описание
Type narrowing vs type casting is something you can struggle with. It are very powerfull concepts within typescript. Type narrowing allows you to access properties and methods that are only available on certain types, and also helps TypeScript to catch errors and bugs at compile time. Mastering these concepts can make you a better programmer.
Рекомендации по теме