/// import { Component, ValidationMap, ReactElement, ReactNode } from 'react'; import { Store, RouterStoreState } from './Store'; import { RouteProps, RouteChildContext } from './Route'; import { RedirectProps } from './Redirect'; export declare type SwitchProps = { children?: ReactNode; renderContainer?: (children: ReactElement<(RouteProps | RedirectProps)>[]) => JSX.Element; }; export declare type SwitchContext = { routerStore: Store; }; /** * Render the first Route that match * To do so, Switch take the passed children and test their match props * It find the first match and pass in a swtichIndex in context */ export declare class Switch extends Component { static displayName: string; private routerStore; private validChildren; static childContextTypes: ValidationMap; static contextTypes: ValidationMap; context: SwitchContext; private unsubscribe; private isUnmounted; constructor(props: SwitchProps, context: SwitchContext); getChildContext(): RouteChildContext; UNSAFE_componentWillReceiveProps(nextProps: SwitchProps): void; componentWillUnmount(): void; render(): JSX.Element; private defaultRenderContainer(children); private updateValidChildren(props); private update(props, forceUpdate?); }