Verify TypeScript PR #60680 already ported: Mark inherited any-based index signatures #1856
+0
−0
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.
This PR verifies that TypeScript PR #60680 has already been ported to the Go codebase.
TypeScript PR #60680 Summary
The original TypeScript PR (microsoft/TypeScript#60680) marks inherited any-based index signatures so they can be elided in declaration emit. This prevents them from being mistaken for late-bound index signatures, which is important for partial/single-file compilation modes where extra
any
types from missing imports could spoil the emit.Verification Results
All changes from the TypeScript PR are already present in the Go codebase:
Cached index info: A
anyBaseTypeIndexInfo
field was added to the checker struct to cache the any-based index signature instead of creating it inline each time.Usage locations: The cached index info is used in:
any
(internal/checker/checker.go:18408
)any
(internal/checker/checker.go:19945
)Emit filtering: The emit resolver skips
anyBaseTypeIndexInfo
during declaration emit to avoid including inherited any-based index signatures (internal/checker/emitresolver.go:1017-1019
).Testing
declarationEmitClassInherritsAny.ts
from the TypeScript PRThe port was already included in the initial Go codebase (commit 9374294 from October 9, 2025), which postdates the TypeScript PR merge (December 4, 2024). No additional changes are required.
Original prompt
Note
Custom agent used: Strada to Corsa Port Expert
A Go and TypeScript expert who can easily figure out how to port PRs from one language to another
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.