-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
The latest version of react-docgen includes fixes for support of union types in JSDoc, which would be really great to have supported in react-styleguidist as well.
https://github.com/reactjs/react-docgen/commits/v2.10.0
I discovered this by tracking down the following console error (styleguidist server console - not JavaScript console).
Error when parsing src/components/select/Select.js
TypeError: Cannot read property 'name' of undefined
Here is an example of the offending JSDoc comment: Note the union type of {(string|number)}.
/**
* Retrieve a value from the given options and valueKey
* @param {(string|number)} value - the selected value(s)
* @param {Object} props - the Select component's props (or nextProps)
*/
expandValue(value, props) {
...
}
Metadata
Metadata
Assignees
Labels
No labels