The most prominent new feature of the new 1.6 version is React/JSX support.
Designed with feedback from React experts and the React team, we’ve built full-featured support for React typing and the JSX support in React. Below, you can see TypeScript code happily coexisting with JSX syntax within a single file with the new .tsx extension. This allows React developers to intermingle HTML-like syntax with TypeScript code.
Our goal was to make it feel natural to work with React/JSX and to have all the type-checking and autocomplete capabilities of TypeScript. This allows you a rich editing experience for working with React and JSX when using VS, VS Code, and Sublime.
TypeScript 1.6 also adds the ability to create user-defined type guards. In addition to standard type-checking using if statement comparisons, guard functions are succinctly declared with a return value of “value is Type”, which returns a boolean that can work with instanceof and typeof comparison checks and better facilitates compile-time checking of dynamic types.
Up next is intersection types, which creates a very convenient shorthand for combining two different types via the new & operator, obviating the need to create clunky interfaces that inherited from other types.
A hotly demanded feature that has finally been incorporated is abstract classes. Abstract classes function similar to interfaces, but have the added option of describing implementation details meant to be consumed directly by their inheritors.
Another popular feature implemented is generic type aliases, which supplants the previous limitation of only allowing simple aliases that shortened long type names. Type aliases can now be generic, granting them full expressive capabilities.
No update this big comes without the possibility of breaking compatibility with older versions. In an effort to better facilitate the objectives of TypeScript, TypeScript 1.6 now requires object literals to be matched more closely. Failure to do so will elicit compile time errors. According to the beta, this has already mitigated hundreds of potential bugs and errors. Look here for a more comprehensive examination of potentially breaking scenarios.
Finally, the TypeScript team is working on a set of improvements to module resolution. This is currently a work in progress, and the team welcomes all community feedback to help in figuring it out.
It should be stressed that the development of TypeScript is incredibly transparent and open: virtually all of TypeScripts feature implementations have been the result of exhaustive discussion between the TypeScript team and members of the developer community.
So, if you’re interested in improving TypeScript to work better for you, head on over to the language’s website and send them your thoughts.