You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the above example, react-docgen generates types for Fn2, but does not generate types for Fn1 which is defined with a call signature type.
Expected Behavior
This code:
// component.tsxinterfaceA{foo: string;}typeComponentType=(props: A)=>JSX.Element;constComponent1: ComponentType=(props)=><div/>;// does not include generated propsconstComponent2=(props: A)=><div/>;// includes generated props
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.
The text was updated successfully, but these errors were encountered: