Replies: 2 comments
-
I agree it would be better. I guess a reason not to is the cost of retrofitting the "required". FWIW I actually would have always preferred to mark up required than optional - IMO it's better to provide an instruction related to something that you have to do rather than "not do". But if we were going to do that, we might as well do both. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is probably feasible for IDL where there's a binary distinction between optional and required, but the state of optionalness is a mess in JS. See https://github.com/orgs/mdn/discussions/201 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This came out of mdn/content#27110 and I thought it was worth asking the question.
Our current practice is to document when parameters are optional, making it implicit that when this is omitted, they are required (which is the inverse of IDL). We could instead always annotate parameters as either optional or required, then people would not have to understand this convention. Is there some reason why we should not do this?
Beta Was this translation helpful? Give feedback.
All reactions