Repository navigation
Restore index signature details in property hovers - #64586
Mateusz Burzyński (Andarist) wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Inherited index-signature hover containers depend on which receiver is hovered first.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Restores index-signature context in property hovers, addressing #64582.
Changes:
- Renders index containers and key types in hovers.
- Exposes checker index information to the language service.
- Adds and re-enables fourslash coverage and updates JSX baselines.
| File | Description |
|---|---|
tsc/internal/checker/exports.go |
Exposes index-symbol information. |
tsc/internal/ls/hover.go |
Formats index-signature hover details. |
tsc/internal/fourslash/tests/quickInfoIndexSignatureProperty_test.go |
Tests common index signatures. |
tsc/internal/fourslash/tests/quickInfoIndexSignaturePropertyUnchecked_test.go |
Tests unchecked indexed access. |
tsc/internal/fourslash/tests/quickInfoOnPropDeclaredUsingIndexSignatureOnInterfaceWithBase_test.go |
Re-enables inherited-signature coverage. |
tsc/internal/fourslash/tests/jsDocPropertyDescription1_test.go |
Re-enables string-index JSDoc coverage. |
tsc/internal/fourslash/tests/jsDocPropertyDescription4_test.go |
Re-enables union-key JSDoc coverage. |
tsc/internal/fourslash/tests/jsDocPropertyDescription7_test.go |
Re-enables static-index JSDoc coverage. |
tsc/testdata/baselines/reference/fourslash/quickInfo/quickInfoOnJsxIntrinsicDeclaredUsingTemplateLiteralTypeSignatures.baseline |
Updates template-literal JSX hovers. |
tsc/testdata/baselines/reference/fourslash/quickInfo/quickInfoOnJsxIntrinsicDeclaredUsingCatchCallIndexSignature.baseline |
Updates catch-all JSX hovers. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 3
Open (3)
Importing the standard-library "maps" and "slices" packages requires Go 1.21+. If this repo/tooling… · New maps.Values iterates in an unspecified order, so siblingSymbols ordering can vary between runs. If… · New GetIndexInfosOfIndexSymbol (via Checker.GetIndexInfosOfIndexSymbol) builds a slice of all parent… · New
Resolved since last review (1)
| func (c *Checker) GetIndexInfosOfIndexSymbol(symbol *ast.Symbol) []*IndexInfo { | ||
| var siblingSymbols []*ast.Symbol | ||
| if symbol.Parent != nil { | ||
| siblingSymbols = slices.Collect(maps.Values(c.getMembersOfSymbol(symbol.Parent))) |
There was a problem hiding this comment.
Yeah, I would suggest sorting these.
There was a problem hiding this comment.


fixes #64582