Feeds

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

Next VS2013 update to make TypeScript a first-class citizen

The Power of One Brief: Top reasons to choose HP BladeSystem

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. ®

Securing Web Applications Made Simple and Scalable

More from The Register

next story
Whoah! How many Google Play apps want to read your texts?
Google's app permissions far too lax – security firm survey
Chrome browser has been DRAINING PC batteries for YEARS
Google is only now fixing ancient, energy-sapping bug
Do YOU work at Microsoft? Um. Are you SURE about that?
Nokia and marketing types first to get the bullet, says report
Microsoft takes on Chromebook with low-cost Windows laptops
Redmond's chief salesman: We're taking 'hard' decisions
EU dons gloves, pokes Google's deals with Android mobe makers
El Reg cops a squint at investigatory letters
Big Blue Apple: IBM to sell iPads, iPhones to enterprises
iOS/2 gear loaded with apps for big biz ... uh oh BlackBerry
OpenWRT gets native IPv6 slurping in major refresh
Also faster init and a new packages system
Google shows off new Chrome OS look
Athena springs full-grown from Chromium project's head
prev story

Whitepapers

Top three mobile application threats
Prevent sensitive data leakage over insecure channels or stolen mobile devices.
The Essential Guide to IT Transformation
ServiceNow discusses three IT transformations that can help CIO's automate IT services to transform IT and the enterprise.
Mobile application security vulnerability report
The alarming realities regarding the sheer number of applications vulnerable to attack, and the most common and easily addressable vulnerability errors.
How modern custom applications can spur business growth
Learn how to create, deploy and manage custom applications without consuming or expanding the need for scarce, expensive IT resources.
Consolidation: the foundation for IT and business transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.