author | handle | source | date |
---|---|---|---|
Matt Pocock |
@mattpocockuk |
2022-11-14 12:23:00 UTC |
Matt Pocock
🔥 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