Assuming I have a typedef type in a js module
// somewhere/foo.js
/**
* @module
*/
/**
* @typedef Foo
* @type {object}
* property {string} bar - some property
*/
Is it possible to reference this type in another module, so that in the HTML page generated by jsdoc, the type is displayed as a link to the typedef-ed module ?
I tried variations of this, but nothing seems to work...
// somewhere_else/bar.js
/**
* @module
*/
/**
* @param {somewhere/foo/Foo} foo - some param
*/
export default function doStuff(foo) {
...
}
This works for me ...
// somewhere/foo.js
/**
* @module foo
*/
/**
* @typedef module:foo.Foo
* @type {object}
* @property {string} bar - some property
*/
and ...
// somewhere_else/bar.js
/// <reference path="foo.js" />
/**
* @module bar
*/
/**
* @param {module:foo.Foo} foo - some param
*/
function doStuff(foo) {
//...
};