- Notifications
You must be signed in to change notification settings - Fork13.2k
Description
I just updated VS Code to build using TypeScript 3.8 nightly. From this, the VS Code team has some feedback on the UX around the newimport type syntax. I've captured some of our general feedback here. I'll also be opening issues for specific problems I've noticed
The... suggestions to convert imports toimport type feel intrusive
Currently, TypeScript returns a suggestion for every import that only imports types. These suggestions are rendered as... underlines by VS Code
We feel these suggestions are intrusive. In our understanding,import type seems like an advanced feature that is only really required in a few cases. There is nothing strictly wrong with using a normalimport since TS has always been smart enough not to generate an import in the emitted code.
I believe we should disable these suggestions and instead leave them to the linter.
Auto import should not useimport type
Currently, if you are only referencing a value as a type, auto import will try to import it usingimport type. This can get weird if you later try using the same symbol as a concrete value in the same file
Again, I believe that it would be better to add a standardimport and let users explicitly change it toimport type if they desire.
/cc@Tyriar@connor4312 for VS Code
/cc@minestarks@amcasey for other editor feedback