Paul Krill
Editor at Large

Microsoft debuts TypeScript 1.4

news
Jan 22, 20152 mins

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.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author