import { Component } from 'vue'; import { PropsGetter } from '../types/createRouteOptions'; import { PrefetchConfig } from '../types/prefetch'; import { CreatedRouteOptions, Route } from '../types/route'; /** * The loose runtime shape of the `addView` options. Purposely wide: the getter and name types each * `RouteAddView` describes are refined per route and component. */ type ViewOptions = { name?: string; props?: PropsGetter; prefetch?: PrefetchConfig; }; /** * The runtime arguments accepted by `addView`. */ type AddViewParameters = [component: Component, options?: ViewOptions]; /** * The loose runtime signature of the `addView` method. Purposely wide: it returns Route rather than the * refined chainable route each `RouteAddView` overload describes. */ export type AddView = (...args: AddViewParameters) => Route; type View = { name: string; component: Component; props: PropsGetter | undefined; prefetch: PrefetchConfig | undefined; }; export declare function toView(component: Component, options: ViewOptions | undefined): View; /** * Returns a new match with the view merged into its views under the view's name. * * Matches are `markRaw` so that making a route reactive does not turn its components into reactive * proxies. Spreading a match drops that, so the rebuilt one is marked again. */ export declare function addViewToMatch(match: CreatedRouteOptions, { name, component, props, prefetch }: View): CreatedRouteOptions; export {};