Skip to content

Mapped and indexed access type fixes - #17455

Merged
Anders Hejlsberg (ahejlsberg) merged 4 commits into
masterfrom
mappedTypeFixes
Aug 2, 2017
Merged

Mapped and indexed access type fixes#17455
Anders Hejlsberg (ahejlsberg) merged 4 commits into
masterfrom
mappedTypeFixes

Conversation

@ahejlsberg

Copy link
Copy Markdown
Member

This PR adds some missing checks related to indexed access types and mapped types. In particular, for an indexed access T[K] the PR ensures that we always check that K is assignable to keyof T. This check was previously not performed when T is a generic mapped type.

Fixes #17238. This PR supercedes #17336, but keeps the tests from that PR.

@KiaraGrouwstra

Copy link
Copy Markdown
Contributor

Anders Hejlsberg (@ahejlsberg) this fixes checks that were too loose, but there's been an inverse issue of checks that are too strict as well, see #15768.

@microsoft Microsoft (microsoft) locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants