Microsoft has announced the release of version 1.4 of its TypeScript superset JavaScript programming language in conjunction with the fifth community technology preview of Visual Studio 2015.
TypeScript 1.4 adds a series of type system improvements, new template strings, and support for features from ECMAScript 6, the upcoming update to the JavaScript standard. TypeScript program manager Jonathan Turner detailed the TypeScript 1.4 improvements in a blog post.
The main type system additions in TypeScript 1.4 include union types, new type aliases, and const enums (a more restricted form of enums that ensure inline performance and code size during heavy enum use).
(Related: Microsoft’s road map to TypeScript 2.0)
TypeScript 1.4 is a step toward Microsoft’s goal of full ECMAScript 6 support in TypeScript 2.0. Version 1.4 adds a new ECMAScript 6 output mode, a target command-line option allowing developers to switch between ECMAScript 3 and ECMAScript 5 output modes. Along with the addition of ECMAScript 6 template strings for freer expression syntax and support for the “let” and “const” features in addition to “var,” the TypeScript team is working toward implementing ECMAScript 6 features such as native lambdas and classes.
Developers can try out the newest updates to TypeScript 1.4 as part of Visual Studio 2015 CTP 5, which carries its own improvements to debugging, diagnostics, ASP.NET 5 and XAML.
John Montgomery, director of program management for the Visual Studio platform, laid out the major changes in the latest CTP in a blog post. The most significant addition is a new Diagnostic Tools window, which provides developers with Debugger Events through IntelliTrace, along with new CPU Usage and Memory Usage monitoring tools. Debugger Events give developers access to all Break, Output and IntelliTrace events collected during debugging sessions, presented as both as a data timeline and a tabular view.
Visual Studio 2015 CTP 5 also enhances ASP.NET 5 support, with improvements to C# referencing, validation improvements to HTML, CSS and JavaScript editors, and improved support for client-side task runners such as Grunt and Gulp. The latest CTP doesn’t show many apparent changes to the XAML language service, but as the service has been rebuilt atop the open-source Roslyn .NET Compiler Platform, Microsoft plans to implement cross-language refactoring operations, improved IntelliSense filtering, and better XAML data binding in Visual Studio 2015.
More information about Visual Studio 2015 CTP 5 is available here, and the source code for TypeScript 1.4 can be found on GitHub.