Skip to content

fix(57026): Renaming on declaration whose name is a String Literal #61353

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

NamHaiBui
Copy link

@NamHaiBui NamHaiBui commented Mar 5, 2025

Fixes #57026

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Mar 5, 2025
@NamHaiBui NamHaiBui changed the title Renaming on declaration whose name is a String Literal Renaming on declaration whose name is a String Literal(57026) Mar 5, 2025
@NamHaiBui NamHaiBui changed the title Renaming on declaration whose name is a String Literal(57026) fix(57026): Renaming on declaration whose name is a String Literal Mar 5, 2025
@NamHaiBui NamHaiBui marked this pull request as ready for review March 5, 2025 02:52
@NamHaiBui
Copy link
Author

@jakebailey @DanielRosenwasser
Hi, can you review my pr if it's not too much trouble?
I am working on contributing to Typescript as my senior project.

////
////fn("Prop 1"/**/)
////fnc_1("Att 2")
Copy link
Member

Choose a reason for hiding this comment

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

Why are these tests being modified rather than being added to, if anything?

Copy link
Author

@NamHaiBui NamHaiBui Apr 15, 2025

Choose a reason for hiding this comment

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

It was a duplicate test of renameStringLiteralTypes4 so I modified it to reflect one of the cases mentioned in the original issue.

Copy link
Member

Choose a reason for hiding this comment

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

They are not duplicate tests. One is a type, the other is an interface.

Copy link
Author

Choose a reason for hiding this comment

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

I'm sorry about that, I will revert changes and add an additional tests for type as well. Thank you and sorry for the oversight.

@NamHaiBui
Copy link
Author

NamHaiBui commented Apr 16, 2025

@jakebailey
I have updated the code and added in tests to check for both Type declaration and interface declaration.
Again, thank you so much for reviewing this and helping me.

@NamHaiBui NamHaiBui requested a review from jakebailey April 22, 2025 14:41
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename doesn't work on declaration whose name is a string literal
3 participants