Skip to content
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

Inline function & Inline local #30063

Closed
wants to merge 0 commits into from

Conversation

D0nGiovanni
Copy link
Contributor

Fixes #27070 and #18459.
Right now, inlining only works within a file, because I need to do all the checking beforehand in the getAvailableActions function. I fear that if I were to search the whole project, I would violate the performance requirement of getAvailableActions in case of large projects.

Both Inline function and Inline local work the same:

  • Inline all: Replaces all usages in the file and deletes the declaration
  • Inline here: Replaces the selected usage, but does not delete the declaration

Depending on some conditions in the canInline function, the refactoring may not be available. The user does not get feedback on why, though. I opened a related issue #28410, which adds reporting for refactorings to the tsserver interface, but it has not been implemented, yet.

@D0nGiovanni
Copy link
Contributor Author

@RyanCavanaugh I hope this is what you meant by squashing. :)

@Kingwl
Copy link
Contributor

Kingwl commented Feb 26, 2019

It seems that there are many unrelated changes(a failed rebase?)... hope that you have the original changes

@D0nGiovanni
Copy link
Contributor Author

Oh, thanks for noticing. I think I have an idea what went wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants