TypeScript 2.2 Polishes Up A Few Tooling Fixes

New release fixes a number of issues, including more polished tooling fixes while working in the editor, and the addition of a new object type introduced in the second iteration of the ECMAscript offshoot.

There's an incremental update to the TypeScript language available this week, one that contains mainly tooling improvements when working with editors, as well as the introduction of a new object type being trotted out with the second version of this ECMAscript-based offshoot.

Microsoft's Daniel Rossenwasser notes in a blog that TypeScript 2.2 currently works with Visual Studio 2015 Update 3, with support for Visual Studio 2017 coming "in a future upgrade." It also can be configured immediately to work with Visual Studio Code or the Sublime text editor.

One of the areas of improvement in this update, in fact, have to do with tooling when working with editors, said Rossenwasser. "Tooling can be leveraged in any editor with a plugin system," he writes. "This is one of the things that makes the TypeScript experience so powerful." The tooling improvements include quick fixes (Rossenwasser notes that these are also called code actions), wherein the editor will offer suggestions when it notices missing imports or properties, variables that need a this., as well as removing unused declarations and implementing abstract members.

TypeScript 2.2 also introduces a new object type "that matches any types except for primitive types," says Rossenwasser, which means it can be assigned anything except "string, boolean, number, symbol, and when using strictNullChecks, null and undefined." Note the lower-case object, which he said is distinct from the capitalized Object, and is different from the {} type.

Also new: more flexibility with string indexing behavior; improved class support for mixins; introduction of new react-native emit mode; and support for ECMAscript 2015's metaproperty. Besides Rossenwasser's blog, these new capabilities are also detailed in the TypeScript roadmap on GitHub.

TypeScript 2.0 was released in September; version 2.1 was released in December.

About the Author

Michael Domingo is a long-time software publishing veteran, having started up and managed several developer publications for the Clipper compiler, Microsoft Access, and Visual Basic. He's also managed IT pubs for 1105 Media, including Microsoft Certified Professional Magazine and Virtualization Review before landing his current gig as Visual Studio Magazine Editor in Chief. Besides his publishing life, he's a professional photographer, whose work can be found by Googling domingophoto.

comments powered by Disqus


Subscribe on YouTube