Microsoft debuts TypeScript 1.4

The latest version of Microsoft's JavaScript alternative includes support for ECMAscript 6

With TypeScript 1.4, Microsoft offers accommodations for ECMAScript and type system improvements to developers.

Developed by C# and Pascal creator Anders Hejlsberg, TypeScript is an open source technology that compiles to JavaScript. Recently unveiled TypeScript 1.4 accommodates ECMAscript 6, an upgrade to the official specification underlying JavaScript that's still in development.

"In addition to the type system improvements, one of the main goals for the upcoming TypeScript 2.0 release is to fully support the ECMAScript 6 standard. With TypeScript 1.4, we take another step toward this goal," said Microsoft's Jonathan Turner, program manager for the TypeScript team, in a blog post. "In this release, we've added a new ES6 output mode, support for let and const, and support for ES6 template strings."

ECMAScript 6, Turner said, has further improved on string interpolation in JavaScript via template strings. "These special strings can freely mix in expressions, allowing a lighter syntax when pieces of a string depend on associated value." TypeScript 1.4 can compile ES6 template strings down to ES3/ES5.

Type system improvements, meanwhile, include union types, for specifying that a value is one of a number of different types; type aliases, which better document code and improve readability; and const enums, a restricted form of enums. "For heavy uses of enums, it's helpful to have an even more restricted form that we know is safe to always inline. This helps with performance, code size, and with working with cases where the enum aliases themselves may not be exported," said Turner.

Developers can try out improvements in TypeScript 1.4 as part of the Visual Studio 2015 preview, Visual Studio 2013, and the Node Package Manager.

Join the Computerworld newsletter!

Error: Please check your email address.

Tags application developmentMicrosoftsoftware

More about Microsoft

Show Comments