There is a new feature in TypeScript 2.8 that lets you "Organize imports": https://devblogs.microsoft.com/typescript/announcing-typescript-2-8-2/#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.