Skip to content

fix(47794): Fix incorrect substitution on index access on generic mapped type with key remapping - #47837

Closed
Gabrielle Langer (LANGERGabrielle) wants to merge 1 commit into
microsoft:mainfrom
LANGERGabrielle:fixed-generic-access-index-on-generic-mapped-type-with-key-remapping
Closed

fix(47794): Fix incorrect substitution on index access on generic mapped type with key remapping#47837
Gabrielle Langer (LANGERGabrielle) wants to merge 1 commit into
microsoft:mainfrom
LANGERGabrielle:fixed-generic-access-index-on-generic-mapped-type-with-key-remapping

Conversation

@LANGERGabrielle

Copy link
Copy Markdown

Fixes #47794

@typescript-bot TypeScript Bot (typescript-bot) added the For Backlog Bug PRs that fix a backlog bug label Feb 10, 2022
@ghost

Deleted user (ghost) commented Feb 10, 2022

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@LANGERGabrielle
Gabrielle Langer (LANGERGabrielle) force-pushed the fixed-generic-access-index-on-generic-mapped-type-with-key-remapping branch from f37e783 to 49024cb Compare February 10, 2022 21:29

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.

Unfortunately, this fix isn't correct. We shouldn't be calling substituteIndexedMappedType for mapped types with as clauses (see explanation here), and the proper fix is to ensure that doesn't happen. I can put up a PR to that effect.

@typescript-bot TypeScript Bot (typescript-bot) added For Milestone Bug PRs that fix a bug with a specific milestone and removed For Backlog Bug PRs that fix a backlog bug labels Feb 21, 2022
@sandersn

Copy link
Copy Markdown
Member

See also #47889

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Milestone Bug PRs that fix a bug with a specific milestone

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Incorrect substitution on index access with generic key type on generic mapped type with key remapping

4 participants