PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, November 21, 2022

[FIXED] How to invoke the "Organize imports" TypeScript feature in Visual Studio?

 November 21, 2022     typescript, visual-studio     No comments   

Issue

There is a new feature in TypeScript 2.8 that lets you "Organize imports": https://blogs.msdn.microsoft.com/typescript/2018/03/27/announcing-typescript-2-8/#organize-imports

Basically it does the following:

  • remove unnecessary import statements
  • sort the import statements

The page shows that the feature can be invoked in Visual Studio Code with the Shift+Alt+O keyboard shortcut. Does anybody know how this feature can be invoked in Visual Studio (2017)?

UPDATE:

From version 15.8 onward Visual Studio 2017 highlights unused imports by greying them out.


Solution

This feature has now been added to Visual Studio 2017.

One can invoke it the following ways:

  1. Pressing Ctrl+R followed by Ctrl+G.
  2. Right-click in the code window and click Organize Imports in the context menu.


Answered By - Krisztián Balla
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing