-
Notifications
You must be signed in to change notification settings - Fork 152
Linking to external resources
Lloyd Brookes edited this page Oct 14, 2016
·
1 revision
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
- Home
- How jsdoc2md works
- Additional jsdoc tags supported
- Cherry picking which documentation appears in output
- Showcase ...
- Create ...
- How To ...
- How to use with npm run
- How to use with gulp
- How to create one output file per class
- How to document a AMD module
- How to document a CommonJS module (exports)
- How to document a CommonJS module (module.exports)
- How to document an ES2015 module (multiple named exports)
- How to document an ES2015 module (single default export)
- How to document Promises (using custom tags)
- How to document a ToDo list
- How to document ES2017 features
- How to document TypeScript
- The @typicalname tag
- Linking to external resources
- Param list format options
- Listing namepaths
- Troubleshooting