Instead of using classes to encapsulate some JS code we often use namespaces.
To document namespaces JSDoc offers the @namespace tag.
The documentation looks quite similar to a class documentation.
At first glance, there's just another prefix (namespace instead of class).
.. js:autonamespace:: NewNamespace
:members:
:private-members:
:exclude-members: bar
Generated output
Notable changes are:
add template namespace.rst
similar to class.rst
no supers, no interface, no is_interface, no is_static
add directives namespace and autonamespace to js domain
autonamespace and autoclass have the same options
add ir class Namespace
collect doclets by namespace
add renderer AutoNamespaceRenderer
write some tests (very similar to autoclass tests)
I'm not sure, if this directive is going to be used by a lot of people. We just wanted to see a slightly different documentation for classes and namespaces. In addition, the changes do no harm on the rest of the code^^
Instead of using classes to encapsulate some JS code we often use namespaces. To document namespaces JSDoc offers the
@namespace
tag. The documentation looks quite similar to a class documentation. At first glance, there's just another prefix (namespace instead of class).Example JS code
Document namespace like this
Generated output
Notable changes are:
namespace
andautonamespace
to js domainI'm not sure, if this directive is going to be used by a lot of people. We just wanted to see a slightly different documentation for classes and namespaces. In addition, the changes do no harm on the rest of the code^^