File tree 1 file changed +1
-8
lines changed
1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,7 @@ interface PureFunctionComponent<P = {}> {
9
9
export type SetupComponentType = React . ComponentType < any > | PureFunctionComponent ;
10
10
11
11
// Given a C component type, extracts the props of it:
12
- // * If C is an explicitly declared React.Component subclass or React.FC, we can use React.ComponentProps
13
- // * Otherewise if it's a regular function, we can extract its first parameter as the props
14
- // * If not, we give up...
15
- export type FullProps < C extends SetupComponentType > = C extends React . ComponentType
16
- ? React . ComponentProps < C >
17
- : C extends PureFunctionComponent
18
- ? Parameters < C > [ 0 ]
19
- : unknown ;
12
+ export type FullProps < C extends SetupComponentType > = React . ComponentProps < C >
20
13
21
14
export type RenderEnzyme <
22
15
Component extends SetupComponentType ,
You can’t perform that action at this time.
0 commit comments