mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
25 lines
821 B
TypeScript
25 lines
821 B
TypeScript
import * as React from 'react';
|
|
import * as H from 'history';
|
|
import Router from './Router';
|
|
|
|
declare const self: self.RouterContext;
|
|
type self = self.RouterContext;
|
|
export default self;
|
|
|
|
declare namespace self {
|
|
interface RouterContextProps extends React.Props<RouterContext> {
|
|
history?: H.History;
|
|
router: Router;
|
|
createElement: (component: Router.RouteComponent, props: Object) => any;
|
|
location: H.Location;
|
|
routes: Router.RouteConfig;
|
|
params: Router.Params;
|
|
components?: Router.RouteComponent[];
|
|
}
|
|
interface RouterContext extends React.ComponentClass<RouterContextProps> {}
|
|
interface RouterContextElement extends React.ReactElement<RouterContextProps> {
|
|
history?: H.History;
|
|
location: H.Location;
|
|
router?: Router;
|
|
}
|
|
} |