Repository navigation
Inline local refactoring #18459
Description
Activity
- addedVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
on Sep 14, 2017 - addedDomain: LS: Refactoringse.g. extract to constant or function, rename symbole.g. extract to constant or function, rename symbolSuggestionAn idea for TypeScriptAn idea for TypeScript
on Sep 14, 2017 - addedExperience EnhancementNoncontroversial enhancementsNoncontroversial enhancements
on Aug 22, 2018 - addedIn DiscussionNot yet reached consensusNot yet reached consensus
on Nov 6, 2018 I've been working on this issue for a while now, but I'm not too familiar with the compiler API. Is there a way to dynamically generate a new node based on the SyntaxKind of another? I'm concerned that if I just make a copy, the id will stay the same and that would lead to problems down the road.
Wesley Wigham (@weswigham) What is the label in discussion for? Is it being discussed whether to implement the issue at all, or is there a different meaning? I would like to implement it in the near future (1-2 weeks).
Ah, just means we're considering it for inclusion. Everything that's labeled as a "Suggestion" is supposed to have one of a set of sublabels indicative of the issue's state. I felt that was probably most correct here (it's not "committed" because we've not allocated anyone to work on it).
Reacted by Giovanni- removedExperience EnhancementNoncontroversial enhancementsNoncontroversial enhancements
on Apr 25, 2019 Anyone suggest a VSCode extension that does this in lieu of waiting for official support?
Reacted by Carl Walsh and Valentin SOURICEOliverJAsh commented
on Aug 28, 2020 ContributorMore actionsAnyone suggest a VSCode extension that does this in lieu of waiting for official support?
Reacted by Byron Wall, Gjum, Aaron, Charles Allen, Tommaso Resti, Sina Shariati, Charles Ouimet, Niklas Kahn, Mark Katerberg, Martin Jakobsson and 2 moreReacted by Jack, Charles Allen and Tommaso RestiReacted by Gjum, Aaron, Charles Allen, Tommaso Resti, Andrei Bodeanschi, Carl Walsh and Tyler C Laprade, CFA2023
Reacted by Plevi1337Reacted by Pyrolistical, Malcolm Kee, Alexander Kachkaev, brunnerh, Kamen Minkov, Andrii Dieiev, Zhou-Yicheng, Ben Carley, Cleydyr Bezerra de Albuquerque, Leonard Lemke and 1 more- addedFix AvailableA PR has been opened for this issueA PR has been opened for this issue
on May 16, 2023 tylerlaprade commented
on Jun 14, 2023 More actionsThanks Maria Solano (@MariaSolOs) for the fix! Will the documentation be updated to match?
Proposal
Add a refactoring to inline a local variable. Example:
The
Inline localrefactoring onhexStringwould result in: