What is a 'Discriminated Union' in TypeScript?

preview_player
Показать описание
I use discriminated unions all the time with TypeScript and wanted to share a common example of when this is useful. Tough to fit in 60 seconds so comment below if you want a longer video on this!
Рекомендации по теме
Комментарии
Автор

This is where type guards come into play. 👍

ThePoMmeZZ