File tree 1 file changed +0
-17
lines changed
packages/react-docgen/src/utils
1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import type {
12
12
FlowType ,
13
13
InterfaceDeclaration ,
14
14
InterfaceExtends ,
15
- Node ,
16
15
TSExpressionWithTypeArguments ,
17
16
TSInterfaceDeclaration ,
18
17
TSType ,
@@ -42,17 +41,6 @@ function getStatelessPropsPath(
42
41
return value . get ( 'params' ) [ 0 ] ;
43
42
}
44
43
45
- function getForwardRefGenericsType ( componentDefinition : NodePath ) {
46
- const typeParameters = componentDefinition . get (
47
- 'typeParameters' ,
48
- ) as NodePath < Node > ;
49
- if ( typeParameters && typeParameters . hasNode ( ) ) {
50
- const params = typeParameters . get ( 'params' ) as NodePath < Node > [ ] ;
51
- return params [ 1 ] ?? null ;
52
- }
53
- return null ;
54
- }
55
-
56
44
function findAssignedVariableType (
57
45
componentDefinition : NodePath ,
58
46
) : NodePath | null {
@@ -118,11 +106,6 @@ export default (componentDefinition: NodePath): NodePath[] => {
118
106
}
119
107
}
120
108
} else {
121
- const typeAnnotation = getForwardRefGenericsType ( componentDefinition ) ;
122
- if ( typeAnnotation ) {
123
- typePaths . push ( typeAnnotation ) ;
124
- }
125
-
126
109
const propsParam = getStatelessPropsPath ( componentDefinition ) ;
127
110
128
111
if ( propsParam ) {
You can’t perform that action at this time.
0 commit comments