-
Notifications
You must be signed in to change notification settings - Fork 12.8k
fix(58801): "Move to file" on global code unnecessarily imports/exports, generates invalid code #58811
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
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.
This looks right, though it seems like it doesn’t explain the export export export export export export function
bug 😄 Was there any clue about why that happened as you were debugging?
@andrewbranch The
TypeScript/src/services/refactors/moveToFile.ts Lines 901 to 912 in d8086f1
|
It looks like these changes fix the crash mentioned in #58806., the moveToNewFile_global3.ts test covers this case. |
Good to merge as soon as @navya9singh signs off! |
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.
I think I'm good with this, and I'd like to get it in for 5.5.2.
@typescript-bot cherry-pick this to release-5.5 and LKG |
…ts, generates invalid code (#58811)
Hey, @DanielRosenwasser! I've created #58923 for you. |
…e-5.5 (#58923) Co-authored-by: Oleksandr T <[email protected]>
Fixes #58801
Fixes #58806