Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Mapped and indexed access type fixes#17455

Merged
ahejlsberg merged 4 commits into
mastermicrosoft/TypeScript:masterfrom
mappedTypeFixesmicrosoft/TypeScript:mappedTypeFixesCopy head branch name to clipboard
Aug 2, 2017
Merged

Mapped and indexed access type fixes#17455
ahejlsberg merged 4 commits into
mastermicrosoft/TypeScript:masterfrom
mappedTypeFixesmicrosoft/TypeScript:mappedTypeFixesCopy head branch name to clipboard

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.

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.