News for hackers. Stuff that matters.
Re:Reason React 0.8 by Kaze404 on Wednesday May 13, 2020 @08:00PM (#23173373)
> TypeScript's inherent JS-like nature can pop up subtle bugs like forgetting to type a pair of parentheses

FWIW this was just fixed in TypeScript 3.9.

Re:Reason React 0.8 by yawaramin on Wednesday May 13, 2020 @08:17PM (#23173516)
Interesting, can you link me?

EDIT: I just tried in the TypeScript Playground (v3.9.2), it's actually rather worse than I thought, it prints not 'false' but the actual function itself as a value...

Re:Reason React 0.8 by jordwalke on Wednesday May 13, 2020 @09:13PM (#23174007)
- It's Just JavaScript With Types

- It's Usable

- It Has Full Type Safety

Pick two.

I think the TypeScript is aware of the tradeoffs, have chosen the first two, and the result is a great developer/IDE experience for JavaScript programs (props!). Reason chooses the last two and creates a great experience for writing very safe web apps.

Re:Reason React 0.8 by Kaze404 on Thursday May 14, 2020 @12:09AM (#23175171)
https://devblogs.microsoft.com/typescript/announcing-typescr...

Edit: Apparently the functionality already exists as of 3.7. The update in 3.9 was to add it to ternary operations as well

Re:Reason React 0.8 by yawaramin on Thursday May 14, 2020 @12:48PM (#23181875)
Great. But looks like it doesn't work inside a boolean expression.