-
Notifications
You must be signed in to change notification settings - Fork 12.8k
" 1" with a space is treated like numeric property name #728
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
Comments
I believe that technically, this isn't a bug, but it may prompt us to review the TypeScript spec. Perhaps @ahejlsberg, @JsonFreeman, or others can clarify.
|
The definition should probably be tightened to only apply to properties |
Right, I remember discussing this with @RyanCavanaugh. The ecmaScript rules around this can get pretty weird, as |
Any reason this has the milestone of 2.0? This is a relatively minor spec change. |
Agreed |
@ahejlsberg, @osdm, |
Thanks @jasonwilliams200OK, right now this tracks the need to update the spec. |
Fixed in #4033. |
Quoted literal property names with leading or trailing spaces are treated as numeric property names, although they are not treated as numbers by JS.
The text was updated successfully, but these errors were encountered: