Platinum Partner
news,css,html5,javascript,typescript,anders hejlsberg

TypeScript: Microsoft’s New Take on Javascript, from the Creator of C#

Microsoft started October with a bang, unveiling Anders Hejlsberg’s newest creation: TypeScript, a superset of Javascript aimed at making the language’s big jobs easier. Key features of TypeScript include:

S. Somasegar, corporate vice president of Microsoft’s Developer Division, writes:

During the past five years, JavaScript speed has doubled every nine months (as measured by the WebKit SunSpider JavaScript benchmark.) With HTML5, the standard web platform has become significantly more compelling for delivering rich user experiences. At the same time, the reach of JavaScript has continued to expand, going beyond the browser to include native device apps (e.g. Windows Store apps for Windows 8), applications in the cloud (e.g. node.js running on Windows Azure), and more. With these developments, we’re starting to see applications of unprecedented size written with JavaScript, despite the fact that creating large-scale JavaScript applications is hard. TypeScript makes it easier.


Somasegar went on to state that “All Javascript code is TypeScript code” -- so any Javascript framework or library should work with TypeScript, and any line of Javascript entered into TypeScript’s compiler should run as expected. The source code for that compiler is available now, and Microsoft has made TypeScript available on Codeplex under an Apache 2.0 open-source license.

So how does TypeScript differ from CoffeeScript and Dart?

TypeScript prioritizes syntactical similarity to Javascript, making it much closer to core JavaScript than Dart. And although it compiles into JavaScript like CoffeeScript, TypeScript seems less interested in encouraging Javascript best practices; TypeScript is all about adding functionality and making large scale JavaScript applications. 

What I think is most interesting about TypeScript is the fact that it draws heavily on specs from the ECMA committee's next iteration from JavaScript -- so TypeScript is like a tool for using JavaScript the way we'll be able to in the future, when the new standards finally catch up. 

You can watch Anders Hejlsberg introduce TypeScript here:

So what do you think? Will you be using TypeScript to develop Javascript apps? Does it seem more compelling than CoffeeScript or Dart, or roughly the same?

{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}