News

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 new.target 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

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube