
Learn more from Auto-import in TypeScript. To disable the popup, hover over the inspection widget in the top-right corner of the editor, click, and clear the Show Auto-Import Tooltip option.

To accept the suggestion, press Alt+Enter. In TypeScript, WebStorm shows you an auto-import tooltip. Add import statements using the auto-import tooltip For more information, refer to Disabling and enabling inspections.Īlternatively, change highlighting level for the file: hover over the widget in the top-right corner of the editor and select None or Syntax from the Highlight list. If you don't want to see Missing import statement warnings, disable the inspection in the current file or in the entire project. If there's more than one possible source of import, WebStorm shows a list of suggestions: WebStorm marks the symbol as unresolved and shows a tooltip with the suggested quick-fix:
Ed copy of jetbrains webstorm code#
On the Auto Import page that opens, use the checkboxes in the TypeScript/JavaScript area to enable or disable import generation on code completion.įor JavaScript symbols from your project dependencies, WebStorm has a quick-fix for adding import statements when they are missing or when auto-import is disabled. In the Settings dialog ( Control+Alt+S), go to Editor | General | Auto Import. You can disable auto-import on completion and use quick-fixes instead: WebStorm adds import statements when you complete exported JavaScript or TypeScript symbols.

Learn more from Auto-import in JavaScript. When you complete a ES6 symbol or a CommonJS module, WebStorm either decides on the style of the import statement itself or displays a popup where you can choose the style you need. Learn more from Auto-import in JavaScript, Auto-import in TypeScript and Importing an XML namespace.

In JavaScript and TypeScript files, WebStorm automatically adds import statements for modules, classes, components, and any other symbols that can be exported, as well as for XML namespaces.
