GithubHelp home page GithubHelp logo

jsdoc and pseudo-namespaces? about jsdoc HOT 4 CLOSED

jsdoc avatar jsdoc commented on May 12, 2024
jsdoc and pseudo-namespaces?

from jsdoc.

Comments (4)

micmath avatar micmath commented on May 12, 2024

This probably does what you mean in JSDoc 3, but are you saying you would rather not have to document the "my" namespace on it's own?

/**
* Document me.
* @namespace my
*/

/**
* My special namespace
* @namespace my.namespace
*/
$namespace('my.namespace', /** @lends my.namespace **/ {
   /**
    * Foo - does something really neat...
    */
   foo: function() {
   }
});

from jsdoc.

 avatar commented on May 12, 2024

That fixes the issue. I didn't realise that all namespaces in the chain had to be documented. I think that it would be beneficial for jsdoc to fill in the blanks with simple generic pages. A little like phpDoc does.

The information on (http://code.google.com/p/jsdoc-toolkit/wiki/TagNamespace) is confusing because it suggests that @namespace is only followed by a description, when in fact it is followed by the name of the namespace (which makes more sense to me).

Was this a specific change to jsdoc3 or an error in the jsdoc2 wiki?

from jsdoc.

micmath avatar micmath commented on May 12, 2024

You are correct, the @namespace name syntax was added in JSDoc 3, and will be documented here (soon):
http://usejsdoc.org/tags-namespace.html

The difficulty with creating generic pages for undocumented parts of the chain is that, in JavaScript, those pages could refer to almost anything (class, namespace, module, even function or variable), and this gets tricky with very long chains and chains like @namespace foo.bar.Zop#ns. In other words it's simple in the simple case, but there probably isn'y any good way to do it in the complex case. I do understand the desire to have something like that but on the other hand I don't particularly want to make it easy for people to skip documentation for things like root namespaces either.

from jsdoc.

 avatar commented on May 12, 2024

Many thanks for your help. Keep up the great work with jsdoc3!

from jsdoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.