-
Notifications
You must be signed in to change notification settings - Fork 239
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
Syntax for parameters with properties #2
Comments
nene
added a commit
to nene/jsduck
that referenced
this issue
Jun 30, 2011
Thinking of taking the jsdoc-toolkit-style approach:
Same thing with method parameters:
The main question is how to document the return value of the function. We could simply treat the name "return" specially:
This shouldn't cause any conflicts because "return" is a reserved keyword and you can't use it as function parameter name. |
Finally, this is now implemented. |
arthurevans
pushed a commit
to arthurevans/jsduck
that referenced
this issue
Sep 12, 2012
[TIDOC-747] Fixed issue with punctuation in section titles.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Having Markdown support already alleviates this issue, but it would be nice to have a special syntax for this.
One possibility is to adopt the same syntax that jsdoc-toolkit supports:
Another option I've been thinking is to re-use @cfg:
This greatly reduces the amount of duplication. If the function accepts only one parameter (as such functions often do), maybe we could even skip the @param completely:
The only downside is that when you have just one @cfg then the doc-comment will be interpreted as class-level config option, but having a function parameter object with just one possible property is a bit silly and one can always force parsing doc-comment as method doc-comment by using @method.
The best would be to support both syntaxes.
The text was updated successfully, but these errors were encountered: