diff --git a/src/types.ts b/src/types.ts index 1c3a703..0013318 100644 --- a/src/types.ts +++ b/src/types.ts @@ -9,14 +9,7 @@ interface PureFunctionComponent

{ export type SetupComponentType = React.ComponentType | PureFunctionComponent; // Given a C component type, extracts the props of it: -// * If C is an explicitly declared React.Component subclass or React.FC, we can use React.ComponentProps -// * Otherewise if it's a regular function, we can extract its first parameter as the props -// * If not, we give up... -export type FullProps = C extends React.ComponentType - ? React.ComponentProps - : C extends PureFunctionComponent - ? Parameters[0] - : unknown; +export type FullProps = React.ComponentProps export type RenderEnzyme< Component extends SetupComponentType,