import * as vue from 'vue'; import { Component, Ref, App } from 'vue'; // types shared between server and client interface PageData { relativePath: string title: string titleTemplate?: string | boolean description: string headers: Header[] frontmatter: Record lastUpdated?: number } interface Header { level: number title: string slug: string } interface SiteData { base: string /** * Language of the site as it should be set on the `html` element. * * @example `en-US`, `zh-CN` */ lang: string title: string titleTemplate?: string | boolean description: string head: HeadConfig[] appearance: boolean themeConfig: ThemeConfig scrollOffset: number | string locales: Record /** * Available locales for the site when it has defined `locales` in its * `themeConfig`. This object is otherwise empty. Keys are paths like `/` or * `/zh/`. */ langs: Record< string, { /** * Lang attribute as set on the `` element. * @example `en-US`, `zh-CN` */ lang: string /** * Label to display in the language menu. * @example `English`, `简体中文` */ label: string } > } type HeadConfig = | [string, Record] | [string, Record, string] interface LocaleConfig { lang: string title?: string titleTemplate?: string | boolean description?: string head?: HeadConfig[] label?: string selectText?: string } declare const inBrowser: boolean; interface Route { path: string; data: PageData; component: Component | null; } interface Router { route: Route; go: (href?: string) => Promise; } declare function useRouter(): Router; declare function useRoute(): Route; interface VitePressData { site: Ref>; page: Ref; theme: Ref; frontmatter: Ref; title: Ref; description: Ref; lang: Ref; localePath: Ref; } declare function useData(): VitePressData; interface EnhanceAppContext { app: App; router: Router; siteData: Ref; } interface Theme { Layout: Component; NotFound?: Component; enhanceApp?: (ctx: EnhanceAppContext) => void; } declare function withBase(path: string): string; declare const Content: vue.DefineComponent<{}, () => vue.VNode, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, vue.EmitsOptions, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly>, {}>; export { Content, EnhanceAppContext, HeadConfig, Header, LocaleConfig, PageData, Route, Router, SiteData, Theme, VitePressData, inBrowser, useData, useRoute, useRouter, withBase };