-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Revert overly permissive indexed access constraints #54845
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason this file needed to be deleted? Also, why is the baseline not removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can keep it, though I'm not really sure what a failing test like that demonstrates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well presumably we had no other coverage before, right? Maybe I've misunderstood.
Hope this gets merged soon, people are starting to use the lack of errors on stuff like function what<T extends object>(t: T, k: keyof T) {
t[k] * 2; // no error
JSON.parse(t[k]) // no error
} in the wild, or at least in answering Stack Overflow questions |
Reverts #53059 and adds appropriate regression tests.
Fixes #54522.
Fixes #54837.