-
-
Notifications
You must be signed in to change notification settings - Fork 311
Open
Labels
Description
Sorry if this has been reported before in some form before, but is there currently support for nested type descriptions? For example, given the following structure (using Flow and react-docgen@5.3.1):
type Panel = {
/** Panel title */
title: string,
/** Panel content */
content: string,
/** Sublevels of more Panels */
panels: Array<Panel>
};
type Props = {
/** One or more toggleable Panels */
panels: Array<Panel>
}
/** Hello World! */
const Component = (props: Props) => { ... }^ Does not generate any description for the Panel -props. Is this intentional? The output for a Panel is:
{
"name": "signature",
"type": "object",
"raw": "{ ... }",
"signature": {
"properties": [
{
"key": "title",
"value": {
"name": "string",
"required": true
}
},
{
"key": "content",
"value": {
"name": "string",
"required": true
}
},
{
"key": "panels",
"value": {
"name": "Array",
"elements": [{ "name": "Panel" }],
"raw": "Array<Panel>",
"required": true
}
}
]
}
}
kevin-krug and alexmercerind