fix(types): change ComponentOptions to DefineComponent (#1499)

progressbar
Divyansh Singh 2 years ago committed by GitHub
parent 946c579f2b
commit 57116607b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,9 +4,9 @@ declare const __CARBON__: boolean
declare const __VUE_PROD_DEVTOOLS__: boolean
declare module '*.vue' {
import { ComponentOptions } from 'vue'
const comp: ComponentOptions
export default comp
import type { DefineComponent } from 'vue'
const component: DefineComponent
export default component
}
declare module '@siteData' {

23
theme.d.ts vendored

@ -1,18 +1,19 @@
// so that users can do `import DefaultTheme from 'vitepress/theme'`
import type { ComponentOptions } from 'vue'
import type { DefineComponent } from 'vue'
export const VPHomeHero: ComponentOptions
export const VPHomeFeatures: ComponentOptions
export const VPHomeSponsors: ComponentOptions
export const VPDocAsideSponsors: ComponentOptions
export const VPTeamPage: ComponentOptions
export const VPTeamPageTitle: ComponentOptions
export const VPTeamPageSection: ComponentOptions
export const VPTeamMembers: ComponentOptions
// TODO: add props for these
export const VPHomeHero: DefineComponent
export const VPHomeFeatures: DefineComponent
export const VPHomeSponsors: DefineComponent
export const VPDocAsideSponsors: DefineComponent
export const VPTeamPage: DefineComponent
export const VPTeamPageTitle: DefineComponent
export const VPTeamPageSection: DefineComponent
export const VPTeamMembers: DefineComponent
declare const theme: {
Layout: ComponentOptions
NotFound: ComponentOptions
Layout: DefineComponent
NotFound: DefineComponent
}
export default theme

Loading…
Cancel
Save