2 ms·
Thank you, wonder why I couldn't find them. edit: by the way TypeScript supports both ADTs (through tagged unions) as well as exhausting pattern matching (on t
by epolanski 1y ago
Thank you, wonder why I couldn't find them.
edit: by the way TypeScript supports both ADTs (through tagged unions) as well as exhausting pattern matching (on tagged unions, but an alternative can be using `instanceof`).
- gdotdesign 1y agoTechnically you can yes, but the language doesn't support it out of the box, you need to jump through hoops to make it work. But you are right, I'll change TypeScript to say it's partially supported.