-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TS auto import should support configuring whether a star or a qualified import is used. #19630
Comments
I think this one needs some thought. For example, what name should we use for |
Maybe this would be better as a refactoring?
Refactorings conveniently already come with a rename location. |
See #19260 |
Having that as a separate refactoring makes sense, nevertheless I would like to have this right in the first place and not me picking an entry from a completion list and then being forced to execute another refactorings. In another tool I worked on ( :-) ) we had a configuration comparable to this to control the import generation: {
module: 'vs/base/common/types',
importType: ImportType.Star,
identifier: 'Types'
} Default would IMO still be a qualified import. |
you mean |
@mhegazy sorry used wrong words. Default should be |
Copying my original problem here: For example, now if I type For me, I usually have this import * as path from 'path'
path.resolve(...) However now I hope
I think if one types |
In my experience Qualified import makes for more readable code in most cases and its the import pattern advocated for in Haskell, Python, and language-enforced in Go. Likely other language too, I just don't know. Looking forward to support for this. I think its unfortunate qualified is not the default but neither is |
Related: #23830 |
I would be happy if I could write an item name, find it in the completion list, press i.e.
|
Consider https://jsdoc.app/tags-module.html. We can define the |
Anyone know of an extension that can do this right now? |
@wildeyes You might find this useful: https://github.com/unsplash/ts-namespace-import-plugin |
From @dbaeumer on October 31, 2017 11:29
Testing: #37177
'vs/base/common/types'
However what I want in this case is
and the code should become
Types.isStringArray
Would be cool if I can control this via a setting.
Copied from original issue: microsoft/vscode#37258
The text was updated successfully, but these errors were encountered: