diff --git a/types/react-router-config/index.d.ts b/types/react-router-config/index.d.ts index 7644b8f062..2040a8a721 100644 --- a/types/react-router-config/index.d.ts +++ b/types/react-router-config/index.d.ts @@ -14,7 +14,7 @@ export interface RouteConfigComponentProps extends RouteComponentProps { export interface RouteConfig { location?: Location; - component?: React.ComponentType | void>; + component?: React.ComponentType | {}>; path?: string; exact?: boolean; strict?: boolean; diff --git a/types/react-router/index.d.ts b/types/react-router/index.d.ts index 2f38251db8..cfd0b20c66 100644 --- a/types/react-router/index.d.ts +++ b/types/react-router/index.d.ts @@ -64,7 +64,7 @@ export interface RouteComponentProps

{ export interface RouteProps { location?: H.Location; - component?: React.ComponentType | undefined>; + component?: React.ComponentType | {}>; render?: ((props: RouteComponentProps) => React.ReactNode); children?: ((props: RouteComponentProps) => React.ReactNode) | React.ReactNode; path?: string; diff --git a/types/react-router/test/examples-from-react-router-website/PreventingTransitions.tsx b/types/react-router/test/examples-from-react-router-website/PreventingTransitions.tsx index bd5d76ae2b..9f1858c89f 100644 --- a/types/react-router/test/examples-from-react-router-website/PreventingTransitions.tsx +++ b/types/react-router/test/examples-from-react-router-website/PreventingTransitions.tsx @@ -22,7 +22,7 @@ const PreventingTransitionsExample = () => ( ); -class Form extends React.Component { +class Form extends React.Component<{}, {isBlocking: boolean}> { state = { isBlocking: false }; diff --git a/types/rrc/index.d.ts b/types/rrc/index.d.ts index 891ceeaa64..f4ef84e568 100644 --- a/types/rrc/index.d.ts +++ b/types/rrc/index.d.ts @@ -24,8 +24,8 @@ export interface WithScrollOptions { export type ComponentConstructor = React.ComponentType; -export function withScroll(component: ComponentConstructor | undefined>, options?: WithScrollOptions) - : ComponentConstructor | undefined>; +export function withScroll(component: ComponentConstructor | {}>, options?: WithScrollOptions) + : ComponentConstructor | {}>; export type RouteConfiguration = RouteProps & { inject?: { [key: string]: any } };