A CLI and library to extract information from React component files for documentation generation purposes.
3.65k
stars
295
forks
source link
Typescript: Component props not parsed with 'call signature' type #897
Open
isaac-y-baron opened 8 months ago
Description
In Typescript, it's possible to type a function using a call signature.
For example, this is valid TS:
See example in TS Playground
In the above example, react-docgen generates types for
Fn2
, but does not generate types forFn1
which is defined with a call signature type.Expected Behavior
This code:
Produces this output:
Actual Behavior
The same code produces this output:
Steps to Reproduce
Paste the .tsx sample code from the "Expected Behavior" section in the react-docgen playground with Language set to Typescript.