TypeScript Exhaustive Switch: How discriminated unions make your job easier!

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

Рекомендации по теме
Комментарии
Автор

Good pacing... neither so fast that I missed a load of things nor so slow I got bored with all the extra details... Absolutely spot on! :)

edgeeffect
Автор

looking at TypeScript it makes me love Haskell even more.

laughingvampire
Автор

this dude is good, I like how he discusses the practical usage rather than just theory.

dannyroberts
Автор

Discriminated Unions - one of the best features of Typescript! Would be nice if you returned a typed Id (OptionId) instead of a string (this is still a string but has more semantic meaning) Thank's for publishing!

hansschenker
Автор

This one video really did solve a lot of my issues in approaching react component props 🙏 Could really make use of union types instead of using optional props in many cases. One of the best and most underrated typescript content I have come across in recent times. Couldn't digest the fact that it has such lesser views. Awesome content 😄

hyperslowloris
Автор

"ts-pattern" has a super nice way of doing exhaustive pattern matching. It's extremely simple

jon
Автор

bookmarked whole playlist awesome content

codelivewithme
Автор

very informative video and to the point, Loved it . Can't wait to explore more. Please keep making such videos.

deepak_su
Автор

I found recently this channnel, and I was like, another crap typescript channel, but man, u are goldy! Would be good if this typescript knowledge u can transfer to rust series

MrEnsiferum
Автор

Great stuff. The section about `never` and handing the default in the switch was the most enlightening part for me.

ripwolfe
Автор

Bro, just explored all of ur vids, you are awesome. Thanks for sharing..

psycodepath
Автор

Thanks so much, you just saved me a lot of typeguard checks!

bsy
Автор

Thank you so much! This is exactly what I was looking for

inigocilveti
Автор

Thank you for explaining every single detail so clearly! This video has made working with discriminated unions, intersections and switch statements in typescript so much easier for me. 😁

BeeBeeEight
Автор

Dude that’s awesome. Please keep the videos coming

TimothySmithDev
Автор

Wow this is more then amazing !🔥 thank you

amirtec
Автор

great video thanks, can you also make a video about enums in typescript?

developerfriendly
Автор

I can immediately see how this will be useful in at work -> my colleagues are gonna love this! Thanks Andrew 🔥

JavierHarford
Автор

Some people who are using TypeScript Enums should be aware that Enums are a cursed sin to make usage of 😅

Luxcium
Автор

Fantastic stuff, subbed! I’d like to add that the query function may seem overkill at first glance, but it’s absolutely critical because someone somewhen will append new types that may not be catched with simple if else statements :)

nonkelaar