mattpocockuk - 1592130978234900484

mattpocockuk Matt Pocock ✈️ Modern Frontends (@mattpocockuk) - November 14, 2022 at 8:23 PM

🔥 TypeScript Tip 🔥

Using union types can make your types more accurate, but each approach has pro's and con's.

Here, we compare a normal union, a discriminated union, and a type predicate. Which do you prefer? pic.twitter.com/5GWhRk6TlF

https://user-images.githubusercontent.com/870029/206738595-d59a5559-537f-4696-98c4-33fde48aaaa5.mp4

Download mp4

Tweet link

Thread by @mattpocockuk on Threadify Reader App

Last updated