Skip to content

Key of non nullable of generic type parameter #31177

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

Closed
wants to merge 3 commits into from
Closed

Key of non nullable of generic type parameter #31177

wants to merge 3 commits into from

Conversation

dhruvrajvanshi
Copy link
Contributor

Fixes #23368 ?

This specific issue is already kind of fixed but the underlying problem of keyof NonNullable<T> not being assignable to keyof T when T is an unconstrained generic parameter is still there (as demonstrated by the test case).

It's debatable weather this should be merged as this is a very narrow use case.

The only reason against it is performance. I haven't investigated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

keyof NonNullable<T> cannot be used to index type T
1 participant