https://github.com/zakkudo/jsdoc-immutable-plugin
Make working with Immutable types in jsdoc enjoyable.
https://github.com/zakkudo/jsdoc-immutable-plugin
Last synced: 9 months ago
JSON representation
Make working with Immutable types in jsdoc enjoyable.
- Host: GitHub
- URL: https://github.com/zakkudo/jsdoc-immutable-plugin
- Owner: zakkudo
- Created: 2018-08-04T21:39:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-06T05:20:44.000Z (over 7 years ago)
- Last Synced: 2025-03-10T11:03:54.135Z (10 months ago)
- Language: JavaScript
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## jsdoc-immutable-plugin
Make working with [Immutable](https://facebook.github.io/immutable-js/) types in [jsdoc](http://usejsdoc.org/) enjoyable.
Why use this?
- Generates standard types for jsdoc so you can set `allowUnknownTags`
to `false`
- 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:
```console
yarn add --dev @zakkudo/jsdoc-immutable-plugin
```
Add to your jsdoc config with:
```js
"plugins": [
"@zakkudo/jsdoc-immutable-plugin"
],
```
Included Types:
- `Immutable`
- `Immutable.Map`
- `Immutable.List`
- `Immutable.OrderedMap`
- `Immutable.Set`
- `Immutable.OrderedSet`
- `Immutable.Stack`
**Example** *(Tag your Maps)*
```js
/**
* 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)*
```js
/**
* Returns a list of names
* @return {Immutable.List} The generated list
*/
export default function getListOfNames() {
return fromJS(['Jim', 'George', 'Bill']);
}
```