mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Return types updated from undefined to void in react-router and react-router-redux. * Author added to definitions.
24 lines
709 B
TypeScript
24 lines
709 B
TypeScript
import { Basename, History, LocationDescriptor } from "history";
|
|
import { ParseQueryString, RouteConfig, StringifyQuery } from "react-router";
|
|
|
|
interface MatchArgs {
|
|
routes: RouteConfig;
|
|
basename?: Basename;
|
|
parseQueryString?: ParseQueryString;
|
|
stringifyQuery?: StringifyQuery;
|
|
}
|
|
|
|
interface MatchLocationArgs extends MatchArgs {
|
|
location: LocationDescriptor;
|
|
history?: History;
|
|
}
|
|
|
|
interface MatchHistoryArgs extends MatchArgs {
|
|
location?: LocationDescriptor;
|
|
history: History;
|
|
}
|
|
|
|
export type MatchCallback = (error: any, redirectLocation: Location, renderProps: any) => void;
|
|
|
|
export default function match(args: MatchLocationArgs | MatchHistoryArgs, cb: MatchCallback): void;
|