如何使用JSDoc记录函数

dln*_*385 1 javascript documentation standards documentation-generation jsdoc

JSDoc似乎没有接受我的大部分功能.这是一个例子:

/**
 * 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() {
}
Run Code Online (Sandbox Code Playgroud)

JSDoc只接受功能二十三.其余的完全错过了.

我究竟做错了什么?

小智 5

这是一个可以从JSDoc(3)获得更多输出的示例:

/**
 * Function one.
 * @namespace one
 */
(function one() {
    /**
     * Function two.
     * @namespace two
     * @memberof one
     */
    function two() {
        /**
         * Function three.
         * @memberof one.two
         */
        function three() {
        }
    }
})();
Run Code Online (Sandbox Code Playgroud)