Fix completions inside tuple types suggesting value symbols - #64146
Open
luo2430 wants to merge 2 commits into
Open
Fix completions inside tuple types suggesting value symbols#64146luo2430 wants to merge 2 commits into
luo2430 wants to merge 2 commits into
Conversation
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix addresses both reported cursor positions and includes appropriate regression coverage.
Pull request overview
Fixes tuple-type completions so only type-compatible symbols are suggested.
Changes:
- Classifies
[and,within tuple types as type-only locations. - Adds fourslash coverage for empty and trailing-comma tuple positions.
File summaries
| File | Description |
|---|---|
tsc/internal/ls/completions.go |
Corrects tuple completion context detection. |
tsc/internal/fourslash/tests/completionsInEmptyTupleType_test.go |
Verifies type symbols appear and value-only symbols do not. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| defer testutil.RecoverAndFail(t, "Panic on fourslash test") | ||
| const content = `type UserTuple = [["name", string], ["age", number], ["address", string]]; | ||
| type AdminTuple = [/*1*/]; | ||
| type OtherTuple = [string, /*2*/]; |
There was a problem hiding this comment.
Might also want to test type QueryTuple = [typeof /*3*/];
Copilot started reviewing on behalf of
Jake Bailey (jakebailey)
September 4, 2026 08:52
View session
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.
Fixes #
#64145