-
Notifications
You must be signed in to change notification settings - Fork 32.8k
[typescript-language-features] Add importModuleSpecifierEnding preference #90405
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
[typescript-language-features] Add importModuleSpecifierEnding preference #90405
Conversation
Thanks! Quick question: does this only work on TS 3.8+ or does it work on older TS versions? Any idea which TS version it was first introduced with? |
It looks like it should work from TS 3.1 onward: microsoft/TypeScript#26028 |
Does this also influence the "auto update import on rename file" scenario? Should it? (And should the user setting text reflect that?) |
@minestarks I’m open to suggestions on the text, but more and more refactors are incorporating auto-imports (microsoft/TypeScript#36615), so I don’t think we can call them all out individually. Updating this PR with a default “auto” mode that omits this setting so TS Server can continue to pick a default based on project settings. |
@andrewbranch oh OK, I think the text is fine then, I was under the impression that "auto import" only referred to the completion list feature. But it may make sense to think of it as "any instance where we add/edit an import statement for you". |
I want to discuss how this setting will interact with future ESM work with the team first, so I’m going to close in the meantime. |
Ok, we decided to move forward with this, since we anticipate some time and complexity before we have a new module resolution mode that would require |
@andrewbranch Is this good to merge now? |
@mjbvz I don’t know how you all usually handle protocol updates—these changes should now build against TypeScript master/nightly, but will fail with type errors against TypeScript 3.8. Let me know if you want me to work around that somehow, but otherwise yes, this is ready to be merged. |
Thanks. We are in endgame I'm going to hold off on merging this until the March release of VS Code |
extensions/typescript-language-features/src/features/fileConfigurationManager.ts
Show resolved
Hide resolved
Thanks! Will be in VS Code 1.44 (and the insiders for it) |
This PR fixes microsoft/TypeScript#24779
TS protocol update: microsoft/TypeScript#36725