Is your feature request related to a problem? Please describe.
Since react-docgen now supports flowtypes and typescript out of the box, from my understanding, all other typescript docgen methods are deprecated?
But from the following code PropRow.tsx I think there is no flowtype handling yet to supersede the current alternatives.
Describe the solution you'd like
the babel react-docgen plugin should get an update soon with the latest react-docgen version, therefore PropRow.tsx should handle typescript props.
I just didn't find anything regarding typescirpt / flowtype prop handling, which is why I created this issue, to make sure it's beeing tracked 馃榿
still active.
+1 for inferring props from flow types
I think this is related: https://github.com/storybookjs/storybook/issues/6640 and https://github.com/storybookjs/storybook/issues/6640#issuecomment-527529040
Hello @josias-r,
1 Are the types simply not detected by docgen and we need to update it? or
2 Are flow types not displaying correctly inside of addon-docs?
Hi @elevatebart
2.
For now I think the babel react docgen plugin still needs to recieve the docgen update.
When it finally gets updated docgen will generate a flowType property with flow and typescript props inside it.
At this point, this flowType property is not handled by the the addon-docs. Addon-docs is currently ignoring the flowType property.
@elevatebart @josias-r for a little more context, i opened this #8115 issue a bit ago. Looks like some flow types (like primitives) are working by side effect, but like in my example "enums" or more complex types aren't supported
react-docgen support for TypeScript is currently very unstable. I wouldn't recommend using it.
TS & FlowType basic support is available with beta.3
Improvement for TS should be available for the official release of 5.3
Forgot this issue was already created, and filed a duplicate at #9837, where I'm currently tracking my progress. Closing this!
Most helpful comment
react-docgen support for TypeScript is currently very unstable. I wouldn't recommend using it.
TS & FlowType basic support is available with beta.3
Improvement for TS should be available for the official release of 5.3