-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Add convert const to let #33157
Add convert const to let #33157
Conversation
Hi @fuafa thanks for the PR - perfect. After reading the original issue there was a mention about:
But we don't need to handle that because that's now a separate diagnostic error (and so this fixit won't be included) |
errorCodes, | ||
getCodeActions: context => { | ||
const { sourceFile, span, program } = context; | ||
const variableStatement = getVaribleStatement(sourceFile, span.start, program); |
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.
const variableStatement = getVaribleStatement(sourceFile, span.start, program); | |
const variableStatement = getVariableStatement(sourceFile, span.start, program); |
fixIds: [fixId] | ||
}); | ||
|
||
function getVaribleStatement(sourceFile: SourceFile, pos: number, program: Program) { |
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.
function getVaribleStatement(sourceFile: SourceFile, pos: number, program: Program) { | |
function getVariableStatement(sourceFile: SourceFile, pos: number, program: Program) { |
Thanks @orta, sorry for the late response, typo fixed. |
Looks good, thanks 👍 |
Fixes #22473