You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
997 B

import { FunctionComponent } from 'react';
import { History, Location } from 'history-with-query';
import { match } from 'react-router-dom';
export interface IComponent extends FunctionComponent {
getInitialProps?: Function;
preload?: () => Promise<any>;
}
export interface IRoute {
path?: string;
exact?: boolean;
redirect?: string;
component?: IComponent;
routes?: IRoute[];
key?: any;
strict?: boolean;
sensitive?: boolean;
wrappers?: any[];
[k: string]: any;
}
export interface IRouteComponentProps<Params extends {
[K in keyof Params]?: string;
} = {}, Query extends {
[K in keyof Query]?: string;
} = {}> {
children: JSX.Element;
location: Location & {
query: Query;
};
route: IRoute;
history: History;
match: match<Params>;
}
export { default as renderClient } from './renderClient/renderClient';
export { default as renderRoutes } from './renderRoutes/renderRoutes';