From 51e7287c86e23281e6f45efa68becd574032cea2 Mon Sep 17 00:00:00 2001 From: Tanguy Krotoff Date: Thu, 29 Jun 2017 13:31:52 +0200 Subject: [PATCH] React.SFC<...> | React.ComponentClass<...> => React.ComponentType<...> --- types/react-router-config/index.d.ts | 2 +- types/react-router/index.d.ts | 4 ++-- types/rrc/index.d.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/types/react-router-config/index.d.ts b/types/react-router-config/index.d.ts index 8497b0d4b8..7644b8f062 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.SFC | void> | React.ComponentClass | void>; + component?: React.ComponentType | void>; path?: string; exact?: boolean; strict?: boolean; diff --git a/types/react-router/index.d.ts b/types/react-router/index.d.ts index 72afa50e3b..2f38251db8 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.SFC | undefined> | React.ComponentClass | undefined>; + component?: React.ComponentType | undefined>; render?: ((props: RouteComponentProps) => React.ReactNode); children?: ((props: RouteComponentProps) => React.ReactNode) | React.ReactNode; path?: string; @@ -99,4 +99,4 @@ export interface match

{ } export function matchPath

(pathname: string, props: RouteProps): match

| null; -export function withRouter

(component: React.SFC & P> | React.ComponentClass & P>): React.ComponentClass

; +export function withRouter

(component: React.ComponentType & P>): React.ComponentClass

; diff --git a/types/rrc/index.d.ts b/types/rrc/index.d.ts index 6a56baf3fc..891ceeaa64 100644 --- a/types/rrc/index.d.ts +++ b/types/rrc/index.d.ts @@ -22,7 +22,7 @@ export interface WithScrollOptions { alignToTop?: boolean; } -export type ComponentConstructor = React.ComponentClass | React.SFC; +export type ComponentConstructor = React.ComponentType; export function withScroll(component: ComponentConstructor | undefined>, options?: WithScrollOptions) : ComponentConstructor | undefined>;