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

Refactoring: Inline function & Inline local #30101

Closed

Conversation

D0nGiovanni
Copy link
Contributor

Fixes #27070 and #18459.
With this commit, 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.

@RyanCavanaugh
Copy link
Member

We're unable to review PRs that don't have an associated Issue in the Backlog milestone.

@D0nGiovanni
Copy link
Contributor Author

@RyanCavanaugh Is there anything I can do?

@19h
Copy link

19h commented Jul 18, 2019

@RyanCavanaugh This feature seems rather useful. Is there a relevant discussion of this issue for it to be potentially added to a respective milestone?

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.

Inline function refactoring
3 participants