Microsoft Announces JavaScript Rival TypeScript
Microsoft has introduced TypeScript, the successor to JavaScript.
S. Somasegar, Corporate Vice President of the Developer Division at Microsoft, revealed on last week Microsoft's latest answer to JavaScript: a new programming language called TypeScript. Somasegar says the new language is not only aimed at making JavaScript development scale beyond the client, but easier to create large-scale JavaScript applications.
"TypeScript is a superset of JavaScript that combines type checking and static analysis, explicit interfaces, and best practices into a single language and compiler," he writes. "By building on JavaScript, TypeScript keeps you close to the runtime you’re targeting while adding only the syntactic sugar necessary to support large applications and large teams."
JavaScript that's already developed can be brought into the TypeScript "world", as all JavaScript code is already TypeScript code. Programmers can literally copy-and-paste from an existing JavaScript program into a TypeScript file, he said.
In an example, Somasegar complied JavaScript code that was treated like TypeScript. The output was essentially the same JavaScript code save for a few additional whitespaces and semi-colon insertions. TypeScript also allowed him to insert a simple inline type annotation to fix a bug in the original script.
"Because of TypeScript’s closeness to JavaScript, interoperability between TypeScript and JavaScript is simple," he writes. "TypeScript not only allows users to continue using their existing JavaScript libraries, it also allows those users to get early error detection and better tooling using a declare file."
Microsoft is making the new language open-source under the Open Web Foundation’s Final Specification Agreement (OWFa 1.0). Microsoft’s implementation of the compiler is also available on CodePlex (with git) under the Apache 2.0 license. Over the next few months, the TypeScript team will continue to develop CodePlex in the open.
"TypeScript builds upon the good work happening in the TC39 committee, which determines the direction of the ECMAScript standard, the formal standard for JavaScript," he writes. "We continue to work with the committee to evolve the JavaScript language and runtime capabilities. Should the community desire us to go even further and submit TypeScript to the standards body, we’re open to that, too."
Somasegar says the new language is an early preview, and invites the community give it a test drive. That said, developers can learn more about the TypeScript project here, download an early preview, read and discuss the language specification, explore the online playground, and peruse the source of the compiler (on the TypeScript project site on CodePlex, with git).
A 53-minute video overview can be watched here.

Rival? really?
Type Script is build on top of, and compiles to Javascript, while also being a strict superset of javacript.
I fail to see how the two rival each other when TypeScript cannot exist without javascript...
Rival? really?
Type Script is build on top of, and compiles to Javascript, while also being a strict superset of javacript.
I fail to see how the two rival each other when TypeScript cannot exist without javascript...
Just like Google's "dart" and multiple other scripting languages.
unless this TypeScript has multiprocessing, its a waste of time.
Just like Google's "dart" and multiple other scripting languages.
unless this TypeScript has multiprocessing, its a waste of time.
That's stupid to say, note that something similar to typescript (which is basically the same as javascript except that you can specify variable types) is already implemented in Unity (the game engine).
There is Coffee which does the same too.
It's just another scripting language to help people writing javascript without being mad.
Making large JavaScript applications is not a matter of language but a matter of skills. There is no such thing as a "better" programming language to replace experience.
I can't tell the future and I can't tell if typeScript will be widely adopted or not, but I do know JScript and vbScript weren't.
...
Until I got to the bit where it said
...
OK so they spent good money improving something and now they are giving to the world for free, so all the haters please just STFU
http://www.hanselman.com/blog/WhyDoesTypeScriptHaveToBeTheAnswerToAnything.aspx
Get your facts right, Typescript is far more accurately described as MS's answer to CoffeeScript, not JavaScript because it compiles down to JavaScript. VBScript was their 1990's answer to JavaScript, but with today's MS more hip
http://www.heronote.com/files/TypeScript.htm