-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Add check for delete expression must be optional #37921
Conversation
Is needed a test with an index type? Like: interface Bar {
[id: string]: string;
}
declare const a: Bar
delete a["a"];
delete a.b; |
Good point. @typescript-bot pack this. |
Hey, How are you? @typescript-bot @typescript-bot pack this. |
Hey @Kingwl, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running There is also a playground for this build. |
This reverts commit 39beb1d.
This is a breaking change that was added in post beta with no test run on it. I think we should have had more due diligence before pulling it in. I think we should back it out and add it in for 4.0. |
What's the reasoning behind excluding
|
Because |
Seeing a possible bug for the following case - even though TS recognizes that key in delete p[key] can be either 'foo' or 'bar', it does not error.
|
Fixes #13783