-
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
const enum should allow "Infinity" as a valid name #6153
Comments
This is intentional because Recommended fix is to just use |
What is the lookup object exactly? Using the name |
I missed that this enum was |
(Lookup object, see http://stackoverflow.com/a/28818850/1704166) |
Not enforcing that rule for |
Approved even for non- The suggested implementation was to skip any leading |
So what's the new rule now for numeric names? Same as before but make a special exception for "Infinity" and "NaN"? Also @jmatthiesen asked about this a while back. |
Correct (as well as |
@RyanCavanaugh A JavaScript identifier must start with a letter, underscore (_), or dollar sign ($);. So, I think |
Enum members need not be identifiers - they can be quoted much like the property names in object literals |
Reported here too #3572 |
The text was updated successfully, but these errors were encountered: