Skip to content

Conversation

@ahejlsberg
Copy link
Member

Reverts #53059 and adds appropriate regression tests.

Fixes #54522.
Fixes #54837.

Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.

@jcalz
Copy link
Contributor

jcalz commented Jul 26, 2023

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Archived in project

6 participants