TypeScript (or the obligatory post about it)

  • Oct 02, 2012 at 11:43 AM
  • Shawn Wildermuth
  • 5 Comments

Like many of you, I've been itching to see what Anders had up his sleeve and I wasn't disappointed yesterday when they announced TypeScript. After teaching all day, I took a quick look at TypeScript (and I do mean quick).

There was a lot of buzz yesterday and the response seemed to be in one of two camps (for the most part):

  • From some: Microsoft is Saving the World from JavaScript
  • From others: Microsoft is ruining JavaScript and is Just Recreating CoffeeScript

I think I am in the middle of this. TypeScript reminds me a lot of LESS. What I mean by that is that I think the smart thing they did was make all JavaScript valid TypeScript. In case that isn't clear, TypeScript is a superset of JavaScript. This means that they're adding some features to JavaScript to help with large, enterprise sized codebases including:

  • Classes
  • Modules
  • Interfaces
  • Parameter Typing

What I really do like is that, unlike CoffeeScript and other similar projects, is that it is JavaScript. That means that I only need to use TypeScript when I need these particular features. It should make it easier to add this into existing projects without having to do a whole new language. (Also, I am stay in my comfortable curly brace, semi-colon filled world ;)

Have you had a chance to see what it's like? If so, what do you think?

 

Comments

Gravatar

Jonas Cannehag Tuesday, October 02, 2012

I think it is a great way of further improve the developer experience writing javascript. VS2012 brought a lot of improvements and this will make it even better instead of getting stuck in console-debugging and typos!

Gravatar

Jaap Tuesday, October 02, 2012

As a C# guy, doing also some JavaScript, this sounds great. But an essential point will be if there will be debugger support in eg VS. Else you are debugging the JavaScript and see that something is wrong, but you can perhaps exactly locate the problem in the original TypeScript source.

Gravatar

James Hancock Tuesday, October 02, 2012

Still trying to figure out how to get Visual Studio to create a typescript file and get it to compile them automatically into the js that works.

And of course would really like to see VS.net debug into the typescript file instead of the js. Once done this seriously fixes the PITA factor of javascript. At least now it sucks less.

Gravatar

Bart Czernicki Wednesday, October 03, 2012

If typescript can eventually do things like locking primitives for async access, overtop of web sockets (with JavaScript magic), then I would be sold quicker.


Leave a Comment

*
*
*