-
Notifications
You must be signed in to change notification settings - Fork 13k
Open
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureDomain: Auto-importSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
Suggestion
π Search Terms
- auto import
- quick fix
- missing import
β Suggestion
Auto imports / add missing imports should be able to add import * as XYZ from 'XYZ'
when triggered on the symbol name XYZ
in a file. This is useful if you prefer using namespace imports and can also help with discovering/exploring new packages
Right now we have auto imports and an add missing import
quick fix for symbols in a module, but I don't see these options for the module itself
π Motivating Example
- In a new project
npm I @types/vscode
- Open new TS file and write
vscode.
Right now I don't get an auto import for vscode
. I'd expect an import that adds: import * as vscode from 'vscode';
at the top of the file
π» Use Cases
- Make it easier to reference a symbol if you prefer using namespaces from the start
- Helping users explore new packages (just type
vscode.
to see suggestions in thevscode
package) - Working with node packages. It'd be nice to be able to type
fs.
to get anfs
import - Fixing code that has been copy and pasted between files
DanielRosenwasser, russelldavis, davidjbng and remorses
Metadata
Metadata
Assignees
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureDomain: Auto-importSuggestionAn idea for TypeScriptAn idea for TypeScript