-
Notifications
You must be signed in to change notification settings - Fork 164
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
Exclude undefined from the PrimitiveType in grammar #1140
Conversation
This also removes undefined from ConstType, which I think is incorrect. |
but
and undefined is not a primitive type in
So could a constant type be |
It seems the intention was to allow that, per
Probably we should just make undefined a primitive type? It's certainly a primitive type in JavaScript, and I'm not sure why we'd depart. |
And yet https://webidl.spec.whatwg.org/#prod-ConstValue has:
|
Also, are there actual use cases for constants with undefined as the value?
So are String and Symbol, but unless there's a clear use case I don't think we would add those either? |
Ah yeah. Actually allowing What's not dumb is allowing |
Ah, yes, good point. So let's add it to DefaultValue (which actually has string too ;-)). |
Note that
so maybe that's good enough? |
I add |
Closes #1139.
Preview | Diff