You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this request related to a problem? Please describe.
I often find myself wanting to convert assignments to variables from member expressions to destructurings, like:
// fromconstmember=parent.member;// toconst{ member }=parent;
Especially if I now want to access another member of the parent object. Unfortunately I didn't find a refactoring for this. Destructure object seems to be for a different usecase.
Describe the solution you'd like
I'd select any part of the assignment (not sure which?) and select a "Convert to destructured assignment" (or so) refactoring. It would retain the variable names, or use the short syntax if it's the same name:
Also, it would probably be useful if there is a command that can handle multiple members at once.
Not just assignments and not necessarily all in the same place.
Is this request related to a problem? Please describe.
I often find myself wanting to convert assignments to variables from member expressions to destructurings, like:
Especially if I now want to access another member of the parent object. Unfortunately I didn't find a refactoring for this. Destructure object seems to be for a different usecase.
Describe the solution you'd like
I'd select any part of the assignment (not sure which?) and select a "Convert to destructured assignment" (or so) refactoring. It would retain the variable names, or use the short syntax if it's the same name:
The text was updated successfully, but these errors were encountered: