4 ms·
> 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.
by Kaze404 6y ago
> 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.
- yawaramin 6y agoInteresting, 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...
- jordwalke 6y ago- 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.
- Kaze404 6y agohttps://devblogs.microsoft.com/typescript/announcing-typescript-3-9/#uncalled-in-conditionals 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
- yawaramin 6y agoGreat. But looks like it doesn't work inside a boolean expression.