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:
- Pressing Ctrl+R followed by Ctrl+G.
- 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)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.