1

JSDoc doesn't seem to pick up on most of my functions. Here's an example:

/**
 * Function one.
 */
(function one() {
    /**
     * Function two.
     */
    function two() {
        /**
         * Function three.
         */
        function three() {
        }
    }
})();

var four = {
    /**
     * Function five/six.
     */
    five: function six() {
    },
    /**
     * Function seven/eight.
     */
    seven: function eight() {
    },
};

nine.ten = {
    /**
     * Function eleven/twelve.
     */
    eleven: function twelve() {
        /**
         * Function thirteen/fourteen.
         */
        var thirteen = function fourteen() {
        };
    },
    /**
     * Function fifteen/sixteen.
     */
    fifteen: function sixteen() {
    },
};

/**
 * Function eighteen
 */
seventeen(function eighteen() {
});

/**
 * Function twenty.
 */
nineteen(function twenty() {
    /**
     * Function twentyTwo.
     */
    twentyOne(function twentyTwo() {
    });
});

/**
 * Function twentyThree.
 */
function twentyThree() {
}

JSDoc only picks up on function twentyThree. The rest are completely missed.

What am I doing wrong?

1
  • 1
    I've never used JSDoc before, but from glancing at their documentation, I'm not sure why any of your stuff would work. I think you need to go back and read the docs for JSDoc. For example, I think four should be documented as a @namespace (same for your IIFE). And I think you need to use @name and @lends in specific places Commented Jun 3, 2013 at 19:02

1 Answer 1

5

This is one example that will give you more output from JSDoc(3):

/**
 * Function one.
 * @namespace one
 */
(function one() {
    /**
     * Function two.
     * @namespace two
     * @memberof one
     */
    function two() {
        /**
         * Function three.
         * @memberof one.two
         */
        function three() {
        }
    }
})();
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.