refactor(vscode-extension): remove duplicated getTokenAtPosition in c…#68893
Open
erkamyaman wants to merge 1 commit into
Open
refactor(vscode-extension): remove duplicated getTokenAtPosition in c…#68893erkamyaman wants to merge 1 commit into
erkamyaman wants to merge 1 commit into
Conversation
…ompletions handler The completions handler kept a local copy of getTokenAtPosition plus three stale TODO comments noting the duplication, but the function is already exported from server/src/utils.ts (hover.ts and others import it from there). Drop the local copy, import the canonical one, and remove the now-meaningless comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The completions handler kept a local copy of getTokenAtPosition plus three stale TODO comments noting the duplication, but the function is already exported from server/src/utils.ts (hover.ts and others import it from there). Drop the local copy, import the canonical one, and remove the now-meaningless comments.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
completions.tskeeps a local copy ofgetTokenAtPositionplus three stale TODO comments asking for the duplication to be cleaned up. The canonical version already lives inserver/src/utils.tsand is consumed byhover.tsand other handlers, completions is the last duplicate.What is the new behavior?
getTokenAtPositionfrom../utilsincompletions.ts(extending the existing import block).No behavioral change. 21 lines removed, 1 line added.
Does this PR introduce a breaking change?