-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Deleting from readonly dictionary does not give a type error #11480
Labels
Breaking Change
Would introduce errors in existing code
Fixed
A PR has been merged for this issue
Help Wanted
You can do this
Suggestion
An idea for TypeScript
Milestone
Comments
RyanCavanaugh
added
Suggestion
An idea for TypeScript
In Discussion
Not yet reached consensus
labels
Oct 10, 2016
Seems reasonable to disallow |
RyanCavanaugh
added
Help Wanted
You can do this
and removed
In Discussion
Not yet reached consensus
labels
Oct 31, 2016
Approved for PRs. Shouldn't be too complex. |
HerringtonDarkholme
added a commit
to HerringtonDarkholme/TypeScript
that referenced
this issue
Nov 2, 2016
… index signature
HerringtonDarkholme
added a commit
to HerringtonDarkholme/TypeScript
that referenced
this issue
Nov 2, 2016
… index signature
HerringtonDarkholme
added a commit
to HerringtonDarkholme/TypeScript
that referenced
this issue
Nov 3, 2016
… index signature
mhegazy
added a commit
that referenced
this issue
Dec 26, 2016
fix #11480, disallow delete operator on readonly property or index signature
thanks @HerringtonDarkholme ! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Breaking Change
Would introduce errors in existing code
Fixed
A PR has been merged for this issue
Help Wanted
You can do this
Suggestion
An idea for TypeScript
TypeScript Version: 2.0.0, 2.0.3, nightly (2.1.0-dev.20161010)
Code
Expected behavior:
delete x["a"];
should give a compile-time error (as it predictably leads to a runtime error later on).Actual behavior:
No compile-time error is given.
Design Limitation (?)
I understand that this may be a design limitation as in #11180, in this case, this is another vote for the --strictReadonlyChecks flag discussed in #11180.
The text was updated successfully, but these errors were encountered: