import type {ComponentClass, ComponentType, FunctionComponent} from 'react'; import type {InjectedRouter, PlainRoute, WithRouterProps} from 'react-router'; import type {Location} from 'history'; declare module 'react-router' { interface InjectedRouter
, Q = any> {
location: Location , Q = any> {
location: Location ;
routes: PlainRoute[];
}
interface RouteContextInterface {
location: Location ;
routes: PlainRoute[];
}
type ComponentConstructor =
| ComponentClass
| FunctionComponent
| ComponentType ;
declare function withRouter (
component: ComponentConstructor ,
options?: Options
): ComponentClass (
component: ComponentConstructor & S,
options?: Options
): ComponentClass;
params: P;
routes: PlainRoute[];
}
interface WithRouterProps
;
params: P;
router: InjectedRouter
;
params: P;
router: InjectedRouter