如何在 JSDocs 中将模块引用为参数
How does one reference a module as a param in JSDocs
给定如下模块:
/** Config module
* @module Config
*/
export default class Config {
...
如何将 link 指定为参数时指定给 Config 模块?
/**
* Foo
* @module Foo
*/
export default class Foo {
/**
* Create a new instance
* @constructor
* @param {Config} config - the config
*/
constructor(config) {
this.config = config;
}
我似乎无法让配置注册为 link
带有 module:
的简单前缀
见下文
/**
* Foo
* @module Foo
*/
export default class Foo {
/**
* Create a new instance
* @constructor
* @param {module:Config} config - the config
*/
constructor(config) {
this.config = config;
}
给定如下模块:
/** Config module
* @module Config
*/
export default class Config {
...
如何将 link 指定为参数时指定给 Config 模块?
/**
* Foo
* @module Foo
*/
export default class Foo {
/**
* Create a new instance
* @constructor
* @param {Config} config - the config
*/
constructor(config) {
this.config = config;
}
我似乎无法让配置注册为 link
带有 module:
见下文
/**
* Foo
* @module Foo
*/
export default class Foo {
/**
* Create a new instance
* @constructor
* @param {module:Config} config - the config
*/
constructor(config) {
this.config = config;
}