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; params: P; routes: PlainRoute[]; } interface WithRouterProps

, Q = any> { location: Location; params: P; router: InjectedRouter; routes: PlainRoute[]; } interface RouteContextInterface { location: Location; params: P; router: InjectedRouter; routes: PlainRoute[]; } type ComponentConstructor

= | ComponentClass

| FunctionComponent

| ComponentType

; declare function withRouter

( component: ComponentConstructor

, options?: Options ): ComponentClass>; declare function withRouter

( component: ComponentConstructor

& S, options?: Options ): ComponentClass> & S; }