-
Notifications
You must be signed in to change notification settings - Fork 12.8k
keyof "a"
behaves differently when using a type parameter
#23345
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
Comments
This is working as intended. When instantiating a homomorphic mapped type such as |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
What does it mean to "distribute over union types"? Also, it seems that as long as I avoid using What's the practical benefit of making |
TypeScript Version: 2.9.0-dev.20180411
Code
Expected behavior:
No error.
B
is the same asA
.Actual behavior:
Error:
B
is the string literal type"a"
.The text was updated successfully, but these errors were encountered: