News for hackers. Stuff that matters.
Re:TypeScript vs. ReasonML by city41 on Wednesday September 04, 2019 @01:39PM (#20879534)
The article mentions a non handled case in a switch is flagged in Reason but not TypeScript. That is technically true, but you can flag an unhandled case by adding a default case which takes advantage of the never type

https://stackoverflow.com/questions/39419170/how-do-i-check-...

Re:TypeScript vs. ReasonML by loxs on Wednesday September 04, 2019 @01:53PM (#20879695)
This isn't needed any more. Modern TS enforces switch exhaustiveness out-of-the box (if you provide the proper union type, of course).
Re:TypeScript vs. ReasonML by sikan on Wednesday September 04, 2019 @03:12PM (#20880436)
Re:TypeScript vs. ReasonML by loxs on Wednesday September 04, 2019 @11:15PM (#20883577)
Yeah, I always use strict and specify return type. IMO, still counts.
Re:TypeScript vs. ReasonML by city41 on Wednesday September 04, 2019 @02:02PM (#20879791)
Oh awesome, I didn't know that. Thanks for the heads up.