Search code examples
typescriptvisual-studio-codetypescript-typingstypescript3.0

vscode typescript: 'Add all missing imports' shortcut


I am working on a typescript project (typescript3.x).

I recently noticed the Add all missing imports when I click on the bulb which comes when I am using more than one types which are not yet imported as shown below:

Is there a shortcut for the same? Or should I request it as a feature?

Thanks in advance


Solution

  • I think vscode now has this feature built in.

    The shortcut Ctrl + . gives us options to autofix issues. I found this working even in case of multiple imports and all.

    Please let me know if there is any other way to do the same :)