The upgrade has moved to a release candidate status, which is commonly the last stage before general availability, and a road map for the language has version 2.2 arriving this month.
Version 2.2 also introduces an object type that lets a developer perform an object primitive type parameter, which should help catch a large class of bugs while more accurately modeling real-world code. To improve support for the mixin pattern, restrictions have been removed on classes. Developers can write a function that takes a constructor, declares a class that extends the constructor, adds members to the new class, and returns the class itself. Mixins enable building up classes from reusable components by combining simpler, partial classes.
Due in May, TypeScript 2.3 is set to feature generator support for ECMAScript 3 and 5, asynchronous iterators, and better support for literal types in JSX attributes. Other features planned for the language include variadic types, which support higher-order functions taking a variable number of parameters; project references; type-checking of computed properties for constraints and symbols; and bundling of module type definitions. Nominal typing support, enabling more-refined types, is being investigated as a possible addition to the language as well.
Sign up for CIO Asia eNewsletters.