News for hackers. Stuff that matters.
Re:What I wish I knew about React by akie on Wednesday April 29, 2020 @12:11PM (#23020862)
What if most of TypeScript is embedded into the next version of JavaScript, as happened with Coffeescript?
Re:What I wish I knew about React by zdragnar on Wednesday April 29, 2020 @12:41PM (#23021174)
Typescript offers almost no runtime behavior. With a few exceptions, everything is stripped out, and it only offers to transpile modern JS features to older browsers. CoffeeScript was all about an alternate syntax for runtime behavior.

JS isn't going to get compile time anything. There was an attempt at adding "strong mode" by one of the google / chrome teams iirc and that went nowhere.

Re:What I wish I knew about React by Zarel on Wednesday April 29, 2020 @01:33PM (#23021852)
All I really wanted was to allow type annotations in JavaScript. So you wouldn't need a compile step while running (JavaScript would just ignore the type signatures), but TypeScript could check it whenever. I believe this is the approach Python uses.

I think there were discussions of doing that at some point, but it seems to have gone nowhere.

Re:What I wish I knew about React by StrangeSound on Wednesday April 29, 2020 @12:28PM (#23021036)
Then there's not really a problem. You learned how it works, and now it's one less thing to worry about
Re:What I wish I knew about React by hombre_fatal on Wednesday April 29, 2020 @12:42PM (#23021199)
Also, if Javascript got its own type system somehow (not gonna happen anytime soon), you could expect Typescript to compile to it.

And you could transition off of Typescript just as gradually as you could transition on to it.