具有松散扩充模块的 JSDoc 不解析某些项目

JSDoc with loose augmentation module not parsing some items

为使用松散扩充的模块添加 jsdoc 文档的正确方法是什么?或者我只是错误地设置了我的实现?我最终希望我的共享成员包含在我的最终文档中。

我正在尝试在我使用松散增强模型 (as described here) 创建的模块上使用 JSdoc。该模块沿线:

/**
 * @module awesomeModuleToDocument
 * @description This module will make you awesome when setup and parsed correctly.
 */
var awseomeModuleToDocument = (function() {

var _moduleReturnObject = {};

/**
 * These awesome things are not shared but do get parsed as expected.
 * @alias module:awesomeModuleToDocument.privateThingsThatAreAwesome
 * @readonly
 * @enum
 */
var privateThingsThatAreAwesome = {
    /** 0 */
    'Unicorns' : 0,
    /** 1 */
    'Bigfoot' : 1
};

/**
 * These awesome things are shared but do not get parsed as expected.
 * @alias module:awesomeModuleToDocument.publicThingsThatAreAwesome
 * @readonly
 * @enum
 */
_moduleReturnObject.publicThingsThatAreAwesome = {
    /** 0 */
    'Beards' : 0,
    /** 1 */
    'Goats' : 1,
    /** 2 */
    'GoatBeards' : 2,
};

    return _moduleReturnObject;

}(awseomeModuleToDocument || {}));

然而,当我运行 jsdoc 处理此代码时,我得到的输出包含 privateThingsThatAreAwesome,但不包含 public 版本。此外,如果我取出私有枚举的 @alias 标记,我也不会在输出中看到它。

然后我的假设是我没有在 public 案例中正确使用 @alias 标签 - 但是一些测试和搜索让我无处可去。

我对 JSDOC 3.4.3 的输出是:Not awesome JSDOC output

再尝试一下,添加标签 @memberof 似乎给了我预期的文档结果:

 /**
 * These awesome things are now parsing as I expected.
 * @memberof module:awesomeModuleToDocument
 * @alias module:awesomeModuleToDocument.publicThingsThatAreAwesome
 * @readonly
 * @enum
 */
_moduleReturnObject.publicThingsThatAreAwesome = {...}

不过我想还有一个 "more preffered" 方法可以解决这个问题。