Skip to content

Port missing keyof simplification for generic mapped types with name types - #64772

Merged
Jake Bailey (jakebailey) merged 3 commits into
microsoft:mainfrom
Andarist:andarist/typescript-issue-64768-1f08d5
Oct 13, 2026
Merged

Jake Bailey (jakebailey) merged 3 commits into
microsoft:mainfrom
Andarist:andarist/typescript-issue-64768-1f08d5

Conversation

@Andarist

Copy link
Copy Markdown
Contributor

fixes #64768
this PR corrects the misported microsoft/typescript-go#2750

Copilot AI balanced review requested due to automatic review settings October 13, 2026 14:54
@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Oct 13, 2026
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Oct 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation matches the established simplification behavior and includes focused regression coverage.

0 open findings

What changed in this PR

Ports the missing keyof simplification for generic remapped mapped types, resolving TS2536 from #64768.

Changes:

  • Simplifies index types for eligible generic mapped types.
  • Adds regression coverage and updates affected baselines.
File Description
tsc/​internal/​checker/​checker.go Implements index-type simplification.
tsc/​testdata/​tests/​cases/​compiler/​mappedTypeAsClauseIntersectionConstraintIndexedAccess.ts Adds regression cases.
tsc/​testdata/​baselines/​reference/​compiler/​mappedTypeAsClauseIntersectionConstraintIndexedAccess.types Records inferred types.
tsc/​testdata/​baselines/​reference/​compiler/​mappedTypeAsClauseIntersectionConstraintIndexedAccess.symbols Records resolved symbols.
tsc/​testdata/​baselines/​reference/​conformance/​mappedTypeConstraints2.errors.txt Updates changed diagnostic detail.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@jakebailey Jake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Oct 13, 2026
@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Oct 13, 2026
Merged via the queue into microsoft:main with commit a0a0ff5 Oct 13, 2026
29 checks passed
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

TS2536 indexing an as-remapped mapped type by Exclude<keyof T & string, ...> (native 7.0.2 only)

3 participants