【问题标题】:How to document an object containing objects with ESDoc如何使用 ESDoc 记录包含对象的对象
【发布时间】:2019-08-01 21:10:41
【问题描述】:

我正在尝试使用 ESDoc(类似于 JSDoc 的语法)在类构造函数中记录包含其他对象的对象。

/** 
 * A description.
 * @type {object}
 */
this.materialProperties = {
    paper: {
        roughness: 0.5,
        metalness: 0.0,
        reflectivity: 0.5
    },
    wood: {
        roughness: 0.5,
        metalness: 0.0,
        reflectivity: 0.5
    },
    metal: {
        roughness: 0.5,
        metalness: 0.5,
        reflectivity: 0.9,
        clearCoat: 1,
        clearCoatRoughness: 0
    },
    glass: {
        roughness: 0.5,
        metalness: 0.5,
        reflectivity: 0.9,
        clearCoat: 1,
        clearCoatRoughness: 0,
        opacity: 0.5,
        transparent: true
    }
}

但是,当我运行文档时,该行被标记为未记录,并且在生成的文档中没有显示任何内容。

我可以做些什么来记录这一行?谢谢!

【问题讨论】:

    标签: javascript jsdoc esdoc


    【解决方案1】:

    问题是 ESDoc 中存在一个错误,如果您有一个包含对象的对象,那么无论您做什么,都不会记录 AFTER 行。

    我在这里在 ESDoc 中创建了一个问题:

    https://github.com/esdoc/esdoc/issues/549

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-09
      • 1970-01-01
      • 1970-01-01
      • 2020-08-06
      • 2016-09-05
      • 2019-04-06
      • 2021-11-22
      • 1970-01-01
      相关资源
      最近更新 更多