-
Notifications
You must be signed in to change notification settings - Fork 485
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
How to group methods by classes? #412
Comments
@tmcw do you happen to know the answer to this? |
Had the same question. It works if you add documentation to the members of a class. Without associated documentation it just puts them into the global scope. So: class Foo {
hello() {}
} will put /** foo */
class Foo {
/** bar */
hello() {}
} will probably work. |
Awesome, thanks @pago, I'll try it out! |
@pago Do you see an issue with this class? I realized I already have the nesting you showed, but it's still not working. |
Hi, how can I nest this type of code?...
This just lists the login function at the same level as the App.controller.Authentication. Many thanks for any help. |
Hi, @froamer! We are using Dojo and it has a similar class definition syntax. I found a way to correctly place methods of the class with a namespace: /**
* Test Class
*
* @class SelectionEngine
* @memberof Bar.Baz
*/
const SelectionEngine = declare(null, {
/**
* @memberof Bar.Baz.SelectionEngine // <-- Note, it must be `@memberof`, NOT `@memberOf`.
* @instance
*
* @param foo
* @param bar
* @param baz
*/
expandColsTo: function(foo, bar, baz) {
},
}) I think it should work for you too. But as you can see on the screenshot, it doesn't render namespace of the class, but only its name. I see two downsides in it:
Is there any way to render the whole name of the class, with its namespace? |
Sorry for the delay: there are a few questions here, I can answer one at this point: For frameworks / libraries that construct 'classes' by calling a function, the key is /**
* The engine that does selection...
*/
const SelectionEngine = declare(
null,
/** @lends SelectionEngine */ {
/**
* @instance
* @param foo
* @param bar
* @param baz
*/
expandColsTo: function(foo, bar, baz) {}
}
); I'll add a note about this to docs. |
This tag is useful for documenting class factories in libraries and frameworks Refs #412
This tag is useful for documenting class factories in libraries and frameworks Refs #412
https://github.com/documentationjs/documentation-theme-light/blob/master/screenshot.png shows the methods in the sidebar grouped by JS classes. I run the default theme or theme-light and all I get in the sidebar is all the methods across the codebase dumped out as one long list (creating, e.g., a long line of
init
entries). How do I group the methods by their associated classes and/or modules? I'm feeding all the JS files in the codebase into thedocumentation build
command, if that matters. Also the--github
,--format
, and--output
options are added. Thanks!The text was updated successfully, but these errors were encountered: