// Type definitions for react-router-config 5.0 // Project: https://github.com/ReactTraining/react-router/tree/master/packages/react-router-config, https://github.com/reacttraining/react-router // Definitions by: François Nguyen // John Reilly // Phoenix He // Mathieu TUDISCO // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import * as React from "react"; import { RouteComponentProps, SwitchProps, match } from "react-router"; import { Location } from "history"; export interface RouteConfigComponentProps extends RouteComponentProps { route?: RouteConfig; } export interface RouteConfig { key?: React.Key; location?: Location; component?: React.ComponentType> | React.ComponentType; path?: string | string[]; exact?: boolean; strict?: boolean; routes?: RouteConfig[]; render?: (props: RouteConfigComponentProps) => React.ReactNode; [propName: string]: any; } export interface MatchedRoute { route: RouteConfig; match: match; } export function matchRoutes(routes: RouteConfig[], pathname: string): Array>; export function renderRoutes( routes: RouteConfig[] | undefined, extraProps?: any, switchProps?: SwitchProps, ): JSX.Element;