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:
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.
This feature has now been added to Visual Studio 2017.
One can invoke it the following ways:
Organize Imports
in the context menu.