-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Allow inferFromUsage to do auto-imports #33915
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
Conversation
if (action.codeAction.changes.length && changes.tryInsertTypeAnnotation(sourceFile, declaration, createTypeReferenceNode(typeNode.qualifier, typeNode.typeArguments))) { | ||
for (const change of action.codeAction.changes) { | ||
const file = sourceFile.fileName === change.fileName ? sourceFile : Debug.assertDefined(program.getSourceFile(change.fileName)); | ||
changes.pushRaw(file, change); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the first codefix to run another codefix and merge its actions? Seems like something that would have a common utility inside the codefox folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completions calls functions from importFixes, but AFAIK no other codefix has called another codefix.
Fixes #32910