/wiki/TagNamespace.wiki

http://jsdoc-toolkit.googlecode.com/ · Unknown · 28 lines · 20 code · 8 blank · 0 comment · 0 complexity · 75125316cff26ff54c957f36a1d451d4 MD5 · raw file

  1. #summary @namespace
  2. == The @namespace Tag ==
  3. The namespace tag allows you to document an object that is being used as a "namespace" to keep a collection of properties and methods under a single global name.
  4. === Syntax ===
  5. {{{
  6. @namespace description
  7. }}}
  8. * description - Optional: a description of this namespace.
  9. === Example ===
  10. _In this example the `load` function will appear as a member of `Extensions.PluginManager`._
  11. {{{
  12. /**
  13. @namespace Holds functionality related to running plugins.
  14. */
  15. Extensions.PluginManager = {
  16. }
  17. Extensions.PluginManager.load(plugin) {
  18. }
  19. }}}
  20. In documentation a namespace should be treated like a static "class" -- it has no constructor -- similar to the built-in `Math` object in !JavaScript. Namespaces should be listed among any other classes, but should not show any constructor in its documentation.