Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve generic mapped type relations #13448

Merged
merged 3 commits into from
Jan 12, 2017
Merged

Conversation

ahejlsberg
Copy link
Member

@ahejlsberg ahejlsberg commented Jan 12, 2017

This PR improves type relationships for generic mapped types: A mapped type { [P in S]: X } is related to a mapped type { [Q in T]: Y } if T is related to S and X' is related to Y, where X' is an instantiation of X in which P is replaced with Q. Notice that S and T are contra-variant whereas X and Y are co-variant.

Fixes #12832.

@ahejlsberg
Copy link
Member Author

@mhegazy Ping.

@ahejlsberg ahejlsberg merged commit 2711303 into master Jan 12, 2017
@ahejlsberg ahejlsberg deleted the fixMappedTypeRelations branch January 12, 2017 23:20
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 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.

None yet

3 participants