d357r0y3r Jimmies: Unrustled 8198 Posts user info edit post |
I watched Anders Hejlsberg's talk & demo on TypeScript over the weekend (available here: http://channel9.msdn.com/Events/Build/2014/3-576) and I've been writing some simple apps using it together with KnockoutJS.
High level view for those not familiar:
-Classes and interfaces: yes, vanilla JS has "classes", but developing large applications is messy and hard to read -Type checking, proper intellisense and rich IDE integration (only used with Visual Studio, personally) -Compiles to regular JavaScript, so if you're needing to support old browsers, no problem -Compile-time errors -Lambda functions
Haven't done anything with Node.js yet, but TypeScript fits in nicely there. Hejlsberg suggests that TypeScript has been modeled after what EMCA 6 is (probably) going to be.
[Edited on May 20, 2014 at 12:12 AM. Reason : ] 5/20/2014 12:11:05 AM |
Noen All American 31346 Posts user info edit post |
Its pretty fucking awesome. Most, if not all, of the web properties I work on use Typescript for all of the front-end code. We use Knockout and typescript for the new Azure portal, along with AMD and requirejs. A lot of big web services are using typescript.
It's got some serious issues with moving big code bases from one major point release to another, but compared to the days 3+ years ago where everything was raw prototyped javascript, the codebases are infinitely more manageable, readable and flexible.
AKA, Microsoft looves some typescript 5/20/2014 1:03:51 AM |
BigMan157 no u 103354 Posts user info edit post |
it compiles to an interpreted language? so it's like SASS:CSS::TypeScript:JavaScript? 5/20/2014 6:36:55 AM |
qntmfred retired 40722 Posts user info edit post |
http://definitelytyped.org/ is pretty handy as well if you're using typescript
seems like coffeescript has more momentum as a "better than vanilla js" solution. i get that typescript is a more ambitious solution probably, but even so, coffeescript adoption still seems to be much stronger than typescript (especially outside the MS ecosystem), so i'm hesitant to fully adopt typescript in my work. on the other hand, it does also seem that coffeescript has plateaued, while innovation in typescript continues. so maybe there still is time for typescript to win out. we'll see. i keep my eye on it.
[Edited on May 20, 2014 at 12:27 PM. Reason : vs coffeescript. and forget dart] 5/20/2014 12:17:14 PM |
Noen All American 31346 Posts user info edit post |
^^Yep.
^Coffeescript is more familiar to Python/Ruby guys. Typescript is more familiar to .NET/Java/C guys. I prefer Typescript personally because it's cut and past compatible with vanilla JS, and because of the Visual Studio tooling.
I can paste JS code snippets into typescript and everything still works. It's a super-set language, unlike Dart and Coffeescript.
And the Typescript tools for VS are amazing. Being able to do stateful edit-and-continue debugging is so damn powerful, it keeps me in Visual Studio for my web development (though I do spent a LOT of my time living in Sublime). 5/20/2014 5:19:13 PM |
lewisje All American 9196 Posts user info edit post |
It's fascinating to see how they implement [b]super[/i] in Javascript: http://www.typescriptlang.org/Playground 5/20/2014 9:55:41 PM |