import React from 'react'; import { History, Location } from 'history'; import { match } from 'react-router'; import { PreloadedQuery } from 'react-relay/lib/relay-experimental/EntryPointTypes'; import { Resource } from './JSResource'; export declare type PreparedQuery = { [queryName: string]: PreloadedQuery; }; export interface Route { location: Location; entries: Entry[]; } export declare type GenericRouteComponent = React.FC; export interface Entry { component?: Resource; prepared: PreparedQuery; routeData: match<{}>; } export interface Router { history: History; get: () => Route; preloadCode: (pathname: string) => void; preload: (pathname: string) => void; subscribe: (callback: (arg: Route) => void) => () => void; } declare const RoutingContext: React.Context; /** * A custom context instance for our router type */ export default RoutingContext;