I'd like know if it's possible to link from one module to another module`s property/method.
What I've tried so far but wasn't working:
/**
* {@link module:modules/modulName#id}
*/
My modules follow this pattern:
/**
* @module modules/modulName
*/
define(function() {
'use strict';
/**
* @alias module:modules/modulName
*/
var module = {
/** Initialisation */
init: function() {}
};
return module;
});
Is there a way to achieve what I want?
Ok so from what I managed to do on my own
/**
* @module namespace/moduleName
*/
/**
* @name module:namespace/moduleName#propName
* @type {Object}
*/
const propName= {}
Then in another file you can reference with:
/*
* @see module:namespace/moduleName#propName
*/
You can use @link
or even @type
if you have @typedef
with that name.
Tested this with PHPStorm and it works as it should. No idea for auto generated API's with JSDOC.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With