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

Exclude undefined from constraints of mapped type type parameters #59995

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Sep 17, 2024

fixes #59987

see @ahejlsberg's comment here about homomorphic mapped types and their constraints

given that keyof X (and the same is true about [K in ...]) should never include undefined, I think it should be fairly OK to eliminate undefined from such rogue instantiations that might happen

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Status: Not started
Development

Successfully merging this pull request may close these issues.

Computed type key inference inconsistent with identical explicitly declared type
2 participants