This article is more than 1 year old

Microsoft's JavaScript challenger nears 1.0, wins Visual Studio love

Next VS2013 update to make TypeScript a first-class citizen

Microsoft's TypeScript web development language is almost ready for prime time, and by the time the next update for Visual Studio 2013 arrives, TypeScript 1.0 will be treated as a first-class language by Microsoft's IDE.

So sayeth S. "Soma" Somasegar, corporate VP of Microsoft's developer division, who announced a new community technology preview (CTP) release of the forthcoming VS2013 Update 2 on Tuesday.

"TypeScript is today being used to build products all over Microsoft, including Visual Studio Online, XBox Music and Video, parts of Bing, and the IE11 Developer Tools," Somasegar said. "Outside of Microsoft, TypeScript is being used in projects like Adobe's Digital Publishing Suite."

Developed at Microsoft by a team that includes language guru and C# architect Anders Hejlsberg, TypeScript offers web developers an alternative to idiomatic JavaScript, which has often been criticized as being bug-prone and difficult to maintain when used in large projects.

Google has been working along similar lines with its own Dart language. Like Dart, TypeScript code is compiled into ordinary JavaScript before being deployed, so it will run in any web browser. But unlike Dart, TypeScript doesn't force developers to learn an entirely new syntax.

Instead, TypeScript is a superset of JavaScript, such that all valid JavaScript code is also valid TypeScript code. Developers can take advantage of TypeScript features like optional static typing and class-based object orientation simply by adding TypeScript syntax to their existing JavaScript routines, rather than rewriting them.

They can even make popular JavaScript libraries like jQuery TypeScript-friendly by writing header files to let the TypeScript compiler know how they should behave under its programming model.

One problem with all of this, however, is that no matter how similar TypeScript is to JavaScript, it isn't strict JavaScript, which means today's JavaScript editors and IDEs won't know how to handle TypeScript code without help from plugins.

Enter Visual Studio 2013 Update 2. The final version of the update is still a few months away, but Tuesday's CTP release shows off how the next version of VS2013 will treat TypeScript as a first-class language, complete with IntelliSense, code navigation, code refactoring, and other features that developers have come to expect from Microsoft's tools.

Screenshot of TypeScript tools in Visual Studio 2013 Update 2

Visual Studio 2013's next update will understand TypeScript code before it's compiled into JavaScript

The release coincides with Microsoft's announcement that the TypeScript language has reached the first release candidate of version 1.0. That means it is now feature-complete for its initial release, its syntax is considered production-ready, and the TypeScript compiler outputs code in a way that fully complies with the 1.0 specification.

The language itself has changed slightly since the last release. In TypeScript 1.0 it's now easier to use the "any" keyword as a wildcard when declaring types, and handling of generic types has been simplified. Interface overloading has also been made more straightforward, making it easier to extend the standard lib.d.ts library. In addition, Microsoft has also added support for touch events and WebGL to lib.d.ts.

Besides TypeScript support, the forthcoming Visual Studio update adds a few other tools for web developers. Most notably, it now includes a full-featured JSON editor with support for syntax coloring, auto-formatting, and code warnings. JSON support has also been added to the debugger, so that complex JavaScript objects can be browsed in JSON format.

Visual Studio 2013 Update 2 CTP 2 is available for download beginning on Tuesday – though as with all CTP releases, Microsoft cautions that it's currently suitable for experimental use only.

TypeScript 1.0RC1 – also known internally as TypeScript 0.9.7 – is available from the TypeScript homepage, and its source code is downloadable from Microsoft's CodePlex site under the Apache 2.0 open source license. ®

More about

TIP US OFF

Send us news


Other stories you might like