Skip to content

Conversation

ahejlsberg
Copy link
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.

@ahejlsberg ahejlsberg changed the title Mapped type fixes Mapped and indexed access type fixes Jul 27, 2017
@ahejlsberg ahejlsberg merged commit 4672457 into master Aug 2, 2017
@ahejlsberg ahejlsberg deleted the mappedTypeFixes branch August 2, 2017 20:36
@gcnew gcnew mentioned this pull request Aug 2, 2017
@KiaraGrouwstra
Copy link
Contributor

@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 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