On Feb 6, 4:46 am,
denis.riabtc...@gmail.com wrote:
> what I meant is something like
>
> /** @object Rect some comment */
> /** @property {optional} x */
> /** @property {optional} left */
> ....
*yeesh* I don't think that's a good solution. It's too heavy-weight,
and doesn't really express what I want to communicate (that x *or*
left may specified, not that both should be present)
> Indeed config options are set by admins, but if an author has a
> strong point that it should be changed, then it should not be a big
> deal.
Hmm... I disagree. That's essentially saying that an author has two
choices: Either don't document the alternate property name, or go
track down the admin and justify why some particular property name
should be added to the config file. 99 times out of 100, the author
will just say, "screw it" and not bother with the alias.
Moreover, I think the ability to provide free-form identifier text is
useful in general.
What about this idea? Allow authors to place identifiers in quotes to
disable the identifier warning? E.g.
* @param {Number} "x/left" this doesn't cause a warning
* @param {Number} x/left ... but this does
If you find an unquoted, incorrect identifier, just log a warning that
reads:
x/left is not a valid identifier. Use quoted version - "x/left" -
to disable this warning