
Sign up to save your podcasts
Or


https://twitter.com/kentcdodds/status/1381453907730128900?s=20
Hey friends So last night I tweeted this TypeScript question. When have you
So the first is discriminating union. Oh and by the way, if you've never
So it's like those situations where you like this should never happen.
To have different props And so square will have a width Rectangle will also
I never want to have a height because I just get it from the width and I
However, sometimes there are definitely use cases for you know, if if
So that was like the primary use case in addition.Switch out ifs and else
And so if you put this as the default case or something and you're not
And I hope you have a wonderful day. Bye.
By Kent C. Dodds5
44 ratings
https://twitter.com/kentcdodds/status/1381453907730128900?s=20
Hey friends So last night I tweeted this TypeScript question. When have you
So the first is discriminating union. Oh and by the way, if you've never
So it's like those situations where you like this should never happen.
To have different props And so square will have a width Rectangle will also
I never want to have a height because I just get it from the width and I
However, sometimes there are definitely use cases for you know, if if
So that was like the primary use case in addition.Switch out ifs and else
And so if you put this as the default case or something and you're not
And I hope you have a wonderful day. Bye.