Make working with Immutable types in jsdoc enjoyable.
Why use this?
- Generates standard types for jsdoc so you can set
allowUnknownTags
tofalse
- Includes links to all of the documentation for the different types on the official site
- Includes short official descriptions from the official site inline
Install with:
yarn add --dev @zakkudo/jsdoc-immutable-plugin
Add to your jsdoc config with:
"plugins": [
"@zakkudo/jsdoc-immutable-plugin"
],
Included Types:
Immutable
Immutable.Map
Immutable.List
Immutable.OrderedMap
Immutable.Set
Immutable.OrderedSet
Immutable.Stack
Example (Tag your Maps)
/**
* Generates an empty map. I'm not sure why you would do this...
* @return {Immutable.Map} The new map
*/
export default function generateMap() {
return fromJS({});
}
Example (Tag your Lists)
/**
* Returns a list of names
* @return {Immutable.List<String>} The generated list
*/
export default function getListOfNames() {
return fromJS(['Jim', 'George', 'Bill']);
}