Skip to content

preserve this when extracting functions - #41992

Merged
Nathan Shively-Sanders (sandersn) merged 6 commits into
microsoft:mainfrom
Zzzen:extract-symbol-this
Apr 7, 2022
Merged

Nathan Shively-Sanders (sandersn) merged 6 commits into
microsoft:mainfrom
Zzzen:extract-symbol-this

Conversation

@Zzzen

Copy link
Copy Markdown
Contributor

Fixes #39931

Previously, this is assumed to be a reference to class. Now we can detect whether this is referring to a class or function. in the latter case, we need to pass this to the new function.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Quick suggestion about naming enum member

Comment thread src/services/refactors/extractSymbol.ts Outdated
Comment thread src/services/refactors/extractSymbol.ts Outdated
@sandersn

Copy link
Copy Markdown
Member

Do you want to keep working on this? Otherwise I'd like to close it to reduce the number of open PRs.

@Zzzen

Copy link
Copy Markdown
Contributor Author

Yes, I will keep working on this.

@jakebailey Jake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems fine to me, no pun intended.

@sandersn
Nathan Shively-Sanders (sandersn) merged commit f4b99ea into microsoft:main Apr 7, 2022
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

this is not preserved when extracted to function in module scope

5 participants