Skip to content

Add codefix and completions for promoting existing type-only imports to non-type-only #47552

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

Merged
merged 5 commits into from
Jan 26, 2022

Conversation

andrewbranch
Copy link
Member

@andrewbranch andrewbranch commented Jan 22, 2022

Fixes #44804

We may want a corresponding VS Code update, because there is currently no indication in the completion details display that this completion has an associated action, even though we send a localized description with the code actions. I only just noticed that VS Code never uses that description; instead, the “Auto-import from ...” text seems to be hard-coded in the extension.

Was trying to get a screen recording, but my recorder software is crashing.

completion entry

codefix menu

codefix menu

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Jan 22, 2022
@andrewbranch
Copy link
Member Author

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 22, 2022

Heya @andrewbranch, I've started to run the tarball bundle task on this PR at 280ad8e. You can monitor the build here.

@andrewbranch
Copy link
Member Author

@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 22, 2022

Heya @andrewbranch, I've started to run the tarball bundle task on this PR at 8dee845. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 22, 2022

Hey @andrewbranch, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/118112/artifacts?artifactName=tgz&fileId=2F94EF63693E9F06E11FA28AF9740F9151E995C6E631B1AFDC2A15F03C8DE06602&fileName=/typescript-4.6.0-insiders.20220122.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@4.6.0-pr-47552-4".;

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some minor questions.

@andrewbranch andrewbranch merged commit 0d3ff0c into microsoft:main Jan 26, 2022
@andrewbranch andrewbranch deleted the feature/44804 branch January 26, 2022 23:07
@lgarron
Copy link

lgarron commented Jan 29, 2022

I had a chance to test this out for #47631 and it's 😻😻😻😻😻😻 for our project!

Thanks so much, @andrewbranch and @typescript-bot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Existing import type prevents autocompletion of value import for TypeScript
4 participants