mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
React.SFC<...> | React.ComponentClass<...> => React.ComponentType<...>
This commit is contained in:
parent
4d12d79360
commit
51e7287c86
2
types/react-router-config/index.d.ts
vendored
2
types/react-router-config/index.d.ts
vendored
@ -14,7 +14,7 @@ export interface RouteConfigComponentProps<T> extends RouteComponentProps<T> {
|
||||
|
||||
export interface RouteConfig {
|
||||
location?: Location;
|
||||
component?: React.SFC<RouteConfigComponentProps<any> | void> | React.ComponentClass<RouteConfigComponentProps<any> | void>;
|
||||
component?: React.ComponentType<RouteConfigComponentProps<any> | void>;
|
||||
path?: string;
|
||||
exact?: boolean;
|
||||
strict?: boolean;
|
||||
|
||||
4
types/react-router/index.d.ts
vendored
4
types/react-router/index.d.ts
vendored
@ -64,7 +64,7 @@ export interface RouteComponentProps<P> {
|
||||
|
||||
export interface RouteProps {
|
||||
location?: H.Location;
|
||||
component?: React.SFC<RouteComponentProps<any> | undefined> | React.ComponentClass<RouteComponentProps<any> | undefined>;
|
||||
component?: React.ComponentType<RouteComponentProps<any> | undefined>;
|
||||
render?: ((props: RouteComponentProps<any>) => React.ReactNode);
|
||||
children?: ((props: RouteComponentProps<any>) => React.ReactNode) | React.ReactNode;
|
||||
path?: string;
|
||||
@ -99,4 +99,4 @@ export interface match<P> {
|
||||
}
|
||||
|
||||
export function matchPath<P>(pathname: string, props: RouteProps): match<P> | null;
|
||||
export function withRouter<P>(component: React.SFC<RouteComponentProps<any> & P> | React.ComponentClass<RouteComponentProps<any> & P>): React.ComponentClass<P>;
|
||||
export function withRouter<P>(component: React.ComponentType<RouteComponentProps<any> & P>): React.ComponentClass<P>;
|
||||
|
||||
2
types/rrc/index.d.ts
vendored
2
types/rrc/index.d.ts
vendored
@ -22,7 +22,7 @@ export interface WithScrollOptions {
|
||||
alignToTop?: boolean;
|
||||
}
|
||||
|
||||
export type ComponentConstructor<Props> = React.ComponentClass<Props> | React.SFC<Props>;
|
||||
export type ComponentConstructor<Props> = React.ComponentType<Props>;
|
||||
|
||||
export function withScroll(component: ComponentConstructor<RouteComponentProps<any> | undefined>, options?: WithScrollOptions)
|
||||
: ComponentConstructor<RouteComponentProps<any> | undefined>;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user