import { Routes } from './route'; import { RoutesName } from './routesMap'; import { RouteParamsByKey } from './routeWithParams'; import { RouteStateByName } from './state'; import { UrlString } from './urlString'; import { AllPropertiesAreOptional } from './utilities'; import { QuerySource } from './querySource'; import { ResolvedRoute } from './resolved'; export type RouterPushOptions = { /** * The query string to add to the url. */ query?: QuerySource; /** * The hash to append to the url. */ hash?: string; /** * Whether to replace the current history entry. */ replace?: boolean; /** * State values to pass to the route. */ state?: Partial; }; type RouterPushArgs> = AllPropertiesAreOptional> extends true ? [params?: RouteParamsByKey, options?: RouterPushOptions>] : [params: RouteParamsByKey, options?: RouterPushOptions>]; export type RouterPush = { >(name: TSource, ...args: RouterPushArgs): Promise; (route: ResolvedRoute, options?: RouterPushOptions): Promise; (url: UrlString, options?: RouterPushOptions): Promise; }; export {};