12
dested
7y

Today on "You're wasting your life by not writing typescript"

Union types

The value with redux, among other things, is incredible

Comments
  • 0
    Because the same thing is already typed?
  • 3
    @duckduckgo because the property hold be thisThing rather than thatThing.

    @dested you could have made a less confusing example, you know.
  • 1
    Union types are sweet, I've only used them in functional languages though. I'm interested to see how 'thing' is implemented so it can handle the case of being a DoThis vs a DoThat. Does TypeScript support any kind of pattern matching?
Add Comment