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
Apple fanbois SCREAM as update BRICKS their Macbook Airs
Ragegasm spills over as firmware upgrade kills machines
HIDDEN packet sniffer spy tech in MILLIONS of iPhones, iPads – expert
Don't panic though – Apple's backdoor is not wide open to all, guru tells us
Mozilla fixes CRITICAL security holes in Firefox, urges v31 upgrade
Misc memory hazards 'could be exploited' - and guess what, one's a Javascript vuln
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
Captain Kirk sets phaser to SLAUGHTER after trying new Facebook app
William Shatner less-than-impressed by Zuck's celebrity-only app
Cheer up, Nokia fans. It can start making mobes again in 18 months
The real winner of the Nokia sale is *drumroll* ... Nokia
EU dons gloves, pokes Google's deals with Android mobe makers
El Reg cops a squint at investigatory letters
Chrome browser has been DRAINING PC batteries for YEARS
Google is only now fixing ancient, energy-sapping bug
prev story

Whitepapers

Designing a Defense for Mobile Applications
Learn about the various considerations for defending mobile applications - from the application architecture itself to the myriad testing technologies.
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.
Reducing security risks from open source software
Follow a few strategies and your organization can gain the full benefits of open source and the cloud without compromising the security of your applications.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.
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.