import * as React from "react"; import { History, UnregisterCallback } from "history"; export interface RouteProps { route?: string | { (props: SiblingProps): boolean; }; defaultRoute?: boolean; partialRoute?: boolean; params?: object; } export interface RouteChild { type: React.ComponentType; props: RouteProps; } export interface RouterProps extends RouteProps { component?: React.ComponentType | string; history?: History; onlyShowFirst?: boolean; children?: React.ReactChild | React.ReactChild[]; className?: string; style?: object; [key: string]: any; } export interface RouterState { matchedAny: boolean; location: History.LocationState; mappedChildren: RouteChild[]; query?: object; } export declare class Router extends React.PureComponent { history: History; unlisten?(): void; static contextTypes: any; static childContextTypes: any; constructor(props: any, context: any); getChildContext(): { history: History; }; componentWillMount(): void; componentWillUnmount(): void; handleChange(location: History.LocationState): void; processRoute(location: History.LocationState, props: RouterProps, context: any): RouterState; render(): JSX.Element; static readonly history: History; static listen(listener: History.LocationListener): UnregisterCallback; static to(path: History.Path, state?: History.LocationState): void; static to(location: History.LocationDescriptor): void; static redirect(path: History.Path, state?: History.LocationState): void; static redirect(location: History.LocationDescriptor): void; static back(): void; static forward(): void; }