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

  • Full Stack Hands-On Development with .NET

    In the fast-paced realm of modern software development, proficiency across a full stack of technologies is not just beneficial, it's essential. Microsoft has an entire stack of open source development components in its .NET platform (formerly known as .NET Core) that can be used to build an end-to-end set of applications.

  • .NET-Centric Uno Platform Debuts 'Single Project' for 9 Targets

    "We've reduced the complexity of project files and eliminated the need for explicit NuGet package references, separate project libraries, or 'shared' projects."

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

Subscribe on YouTube