TypeScript Gets Faster, Adds Language Support with Update
The latest version fixes a compiler slowdown caused by the last version.
TypeScript continues to inch closer to a 1.0 version with the release of 0.9.1. The announcement was made by Microsoft's Jonathan Turner on the TypeScript blog.
Some language features have been added or improved as well, including:
- New support for the 'typeof' operator in type positions. It provides a way to refer to the type of an expression.
- Fewer restrictions on using 'this'. It allows classes to contain both methods on the prototype, and callback functions on the instance. "This lets you mix-n-match between 'closure' style and 'prototype' style class member patterns easily," Turner said.
- A new compiler flag, '--noImplicitAny', has been added. The flag sends a warning when the compiler implicitly infers 'any,' when not explicitly stated in the code. It was an experimental feature in previous TypeScript versions, and became official with 0.9.1.
- Support for using TypeScript within ASP.NET applications has been improved, although the blog didn't say exactly how. Instead, it implied that more information on that integration would be forthcoming.
The last previous update of TypeScript was 0.9, which was released in June. Visual Studio Magazine columnist Peter Vogel wrote an in-depth look at the changes in 0.9 last month. The biggest one was the addition of generics.
Keith Ward is the editor in chief of Visual Studio Magazine.