TypeScript 0.9 arrives with new compiler, support for generics
Microsoft on Tuesday announced TypeScript 0.9.0, the latest version of its
In addition to the usual assortment of bug fixes and performance improvements, this release includes a number of significant new language features and introduces a new, more scalable compiler architecture, according to a blog post by TypeScript program manager Jonathan Turner.
"This release marks the first step of the 0.9.x series, introducing most of the new capabilities of this series which will be further refined over the next few months based on your feedback," Turner wrote.
Perhaps the most important language enhancement is the inclusion of generics, which Turner described as the feature most often requested by TypeScript 0.8 users. Generics allow you to declare APIs using placeholders for the data types of arguments and return values, allowing for more code reuse with increased type safety.
A number of other relatively minor changes to the syntax have also been made that could break compatibility with code written for earlier versions of TypeScript – you can find a list here.
On top of these changes, the TypeScript compiler has been significantly reengineered to provide "a much higher fidelity implementation" of the TypeScript language specification, and to provide better incremental performance when working in IDEs such as Visual Studio.
TypeScript 0.9 already provides much better performance for code completion, error reporting, type information, and various other IDE features, Turner said. Future versions are expected to continue this trend, with the goal of ensuring that IDEs can still provide good performance with code bases of 100,000 lines or more.
On the downside, command-line compilation with TypeScript 0.9.0 is "somewhat slower" than when using the older compiler, but Turner says he expects this to improve significantly in TypeScript 0.9.1.
As with previous versions of TypeScript, Microsoft has released version 0.9 under the Apache 2.0 open source license, and it is available for download from the TypeScript site on CodePlex as of Tuesday. ®
Sponsored: Transform Your IT Infrastructure