1
常量我有以下模块出口常数:如何从模块中引用在JSDoc
/** @module my_constants */
module.exports = {
/** @const {number} */
STATE_FOO: 1,
/** @const {number} */
STATE_BAR: 2
}
现在我有另一个模块,其中一个返回对象可以包含这些常量的任何一个。我怎样才能参考它?
我如下尝试过:
/**
* @typedef {Object} Result
* @property {string} name
* @property {my_constants.STATE_FOO|my_constants.STATE_BAR}
*/
在JSDoc输出的常量逐字记录和不打印链接。有没有办法链接到常量或my_constants
模块?