import { History, Location, HashHistoryBuildOptions, BrowserHistoryBuildOptions } from 'history'; import { ReactElement, ComponentType, ReactNode } from 'react'; export declare type History = History; export declare type Location = Location; export declare type Match = { path: string; url: string; isExact: boolean; params: Partial; }; export declare type ctxValue = { history: History; location: Location; match: Match | null; }; export interface RouterProps { history: History; children?: ReactNode; basename?: string; } export declare type HashRouterProps = { children?: ReactNode; } & HashHistoryBuildOptions; export declare type BrowserRouterProps = { children?: ReactNode; } & BrowserHistoryBuildOptions; export declare type HookResult = { location: Location; history: History; match: Match | null; }; declare type NonNullRecord = { [k in keyof T]: NonNullable; }; export declare type RouteComponentProps = NonNullRecord; export declare type RouteProps = { location?: Location; children?: ReactNode | ((props: HookResult) => ReactElement); render?: (props: RouteComponentProps) => ReactElement; component?: ComponentType; computedMatch?: Match; path?: string; exact?: boolean; sensitive?: boolean; strict?: boolean; }; export declare type Options = { path?: string | Array; exact?: boolean; strict?: boolean; sensitive?: boolean; }; export declare type makeMatchOpt = { exact: boolean; strict: boolean; sensitive: boolean; }; export declare type SwitchProps = { children?: ReactNode; location?: Location; }; export declare type LinkProps = { to?: string; path?: string; children?: ReactNode; onClick?: (e: React.FormEvent) => void; state?: State; }; export declare type RedirectProps = { to?: string; href?: string; }; export {};