Linking to external resources - jsdoc2md/jsdoc-to-markdown GitHub Wiki
1. Say you extended and documented the TestRunner class:
/**
* @extends {TestRunner}
*/
class Runner extends TextRunner {
/**
* My opinion of how tests should be done.
*/
test () {}
}
2. Your output will look like this:
Kind: global class
Extends: TestRunner
My opinion of how tests should be done.
Kind: instance method of Runner
3. It would be useful if the TestRunner
base class reference was hyperlinked to its documentation. To achieve this, create an @external
tag anywhere in your source with an associated @see
tag containing the link:
/**
* @external TestRunner
* @see https://github.com/75lb/test-runner
*/
4. Now, point the @extends
reference to the new external tag's namepath. The final source looks like this:
/**
* @extends {external:TestRunner}
*/
class Runner extends TextRunner {
/**
* My opinion of how tests should be done.
*/
test () {}
}
/**
* @external TestRunner
* @see https://github.com/75lb/test-runner
*/
5. And here's the output - now we have links to the TestRunner
documentation.
Runner ⇐ TestRunner
Kind: global class
Extends: TestRunner
My opinion of how tests should be done.
Kind: instance method of Runner