import { WebsiteRoute } from 'dew-types'; import { MatchFunction, PathFunction } from 'path-to-regexp'; import { ReactNode } from 'react'; export interface RouterNavigator { pushState: History['pushState']; navigate: (to: string) => void; } export declare type UrlQuery = Record; export declare type UrlParams = Record; export interface RouterLocation { pathname: string; search: string; } export declare type StringOrStringArray = string | string[]; export interface MatchedRoute extends WebsiteRoute { path: string; params: UrlParams; matcher: MatchFunction; pathFn: PathFunction; } export interface LinkValue { name: string; lang: string; params?: UrlParams; query?: UrlQuery; } export interface RouteContextValue { path: string; } export interface RouteProviderProps { path: string; children: ReactNode; }