Microsoft Adds Full TypeScript Support To Visual Studio

About a year and a half ago, Microsoft unveiled its TypeScript language to help programmers write large programs in JavaScript. Starting today, with the arrival of the first release candidate of TypeScript 1.0 and the latest update to Visual Studio 2013, it’s becoming a fully supported language in Microsoft’s IDE.

That’s a strong commitment by Microsoft to TypeScript and brings it to the same level of built-in support as C# and Visual Basic. Until now, developers had to install a Visual Studio extension to enable support for the language. That wasn’t exactly a hardship, but the built-in support shows the importance Microsoft is giving this language.

At its core, TypeScript is a superset of JavaScript that adds features like optional static typing and classes for object-oriented programming to the language. Microsoft argues this enables the development of better tools for JavaScript and makes programmers more productive, while preserving compatibility with existing JavaScript libraries. All the code is compiled down to regular JavaScript that can run in any browser. There are no runtime libraries and the compiler doesn’t inject any unnecessary code. In Visual Studio, TypeScript also gets the benefits of Microsoft’s Intellisense and features like statement completion.

As TypeScript chief Anders Hejlsberg (who was also the original author of the venerable Turbo Pascal and Delphi languages) told me, TypeScript is seeing widespread adoption inside of Microsoft. Visual Studio Online, for example, features over 300,000 lines of TypeScript. All of the new features in Xbox Music for Windows 8.1 were written in it and it powers parts of Bing Maps and Photos, Microsoft Dynamics and other apps. 

“We strive to generate beautiful JavaScript code,” Hejlsberg told me. He also argues that developers don’t lose any performance in using TypeScript and may actually gain from having the compiler handle the code for them.

Even outside of Microsoft, the project has gained some traction, which Hejlsberg says exceeded his expectations. He specifically noted how most popular IDEs now offer plug-ins for the language and how Google made the TypeScript compiler part of its Octane benchmark. He also pointed at the very active community around supporting third-party JavaScript frameworks through TypeScript definitions on Definitely Typed on GitHub as an example for how the open source community has rallied around the language.

Early on in the development of TypeScript, which actually started about three years ago, the team decided to keep the framework as light as possible. TypeScript doesn’t add any new statements, for example, though Hejlsberg admitted that there is always the temptation of adding more features and he didn’t rule out the possibility of adding new statements at a later time. Mostly, though, the team will follow the development of ECMAcript 6 (which should be out later this year) and is committed to adding whatever is included there to TypeScript as well.

In Hejlsberg’s view, the 1.0 release candidate that is launching today is essentially the project’s full 1.0 release, but to be conservative, the team decided to call it a release candidate in case users find any new bugs. With this release, the company is making a stronger commitment to keeping new versions backward-compatible, though Hejlsberg expects that the development of the language will continue at the same pace going forward.

The latest update to Visual Studio 2013 is now available for download, and Visual Studio 2012 users can get TypeScript 1.0 RC through a standalone installer. Besides the TypeScript integration, the Visual Studio 2013 update includes a number of new features and bug fixes. You can find a full list of changes here.

As part of this update, Microsoft is also launching new versions of its Team Foundation Server, Visual Studio Online and Team Explorer Everywhere. The new features there mostly center around improved Git and Java build support.