News for hackers. Stuff that matters.
Re:Announcing TypeScript 1.5 by moonchrome on Monday July 20, 2015 @11:57AM (#9916886)
I think the critical point for TypeScript will be 1.6 with async/await - at this point it goes from "nice I have types now" to "OK this solves most of my problems with JS".

Looking forward to Angular 2 and TS 1.6

Re:Announcing TypeScript 1.5 by mixonic on Monday July 20, 2015 @12:05PM (#9916961)
Is this (async/await) not just a feature of ES7?

Personally I would love to see the decoupling of TypeScript's type checker from its transpiler. The ability to use TS with Babel, or Flow with MS's transpiler, would be liberating and spur further innovation.

Re:Announcing TypeScript 1.5 by kylepdavis on Monday July 20, 2015 @01:04PM (#9917370)
You can decouple now. Set the TypeScript output target to ES6 and then pass it all through BabelJS.

It works really well for me and the TypeScript tooling is really good (VS Code or Atom).

Re:Announcing TypeScript 1.5 by davidjnelson on Monday July 20, 2015 @05:50PM (#9919348)
How do you integrate this into a webpack build? Run the typescript plugin first, then the babel plugin? Is there issues using es7 babel stage 0 features like async/await and decorators if you do this? Thanks :-)
Re:Announcing TypeScript 1.5 by egeozcan on Monday July 20, 2015 @12:14PM (#9917033)
I think they're going in the opposite direction as they've implemented JSX support as a part of TypeScript. I mean, I love what they are doing but sometimes I wish we could have all these features as macros/plugins to something like sweet.js. By the way, IIRC, Babel also supports plugins so in theory, type-checking could be implemented as a Babel plugin as well.
Re:Announcing TypeScript 1.5 by spion on Monday July 20, 2015 @02:50PM (#9918138)
IIRC JSX support is only implemented as parsing and type-checking. There is no JS generation. The output will contain the same JSX, which means you'll have to use a JSX compiler on it.
Re:Announcing TypeScript 1.5 by adidahiya on Tuesday July 21, 2015 @12:56AM (#9920630)
The Typescript compiler can emit JS for use with React from JSX. This is a good blog post about it: http://www.jbrantly.com/typescript-and-jsx/
Re:Announcing TypeScript 1.5 by interlocutor on Monday July 20, 2015 @03:08PM (#9918279)
You can use jsxtyper to generate TypeScript interfaces: https://github.com/fuselabs/jsxtyper
Re:Announcing TypeScript 1.5 by iso8859-1 on Monday July 20, 2015 @12:20PM (#9917082)
You can do it in current JavaScript implementations already: https://github.com/bjouhier/galaxy#asyncawait-in-javascript
Re:Announcing TypeScript 1.5 by CmonDev on Tuesday July 21, 2015 @04:19AM (#9921022)
Yes, but who has the patience to wait another 5+ years to get ES7?
Re:Announcing TypeScript 1.5 by _greim_ on Monday July 20, 2015 @12:35PM (#9917170)
> the critical point for TypeScript will be 1.6 with async/await

Is that the official plan? I ask since async/await will presumably be going into the actual JS spec, so I'd expect engines to hold off adding support except behind some kind of warning flag.

Re:Announcing TypeScript 1.5 by coldtea on Monday July 20, 2015 @12:54PM (#9917290)
They won't add async/await as a direct code instructions, but as tranlated code / pollyfill.

Like Babel does, and like TypeScript does for a lot of stuff.

A lot of browser engines don't have classes either, especially any older version.

Re:Announcing TypeScript 1.5 by nippur72 on Monday July 20, 2015 @01:02PM (#9917354)
async/await will a sort of revolution, I hope they put out the 1.6 beta real soon
Re:Announcing TypeScript 1.5 by tracker1 on Monday July 20, 2015 @07:11PM (#9919698)
I've been using async/await for a while with babel/6to5, and love it... it helps to have an understanding of how promises/generators work, but in the end code is SO much cleaner than promise chains.