Skip to content

Commit

Permalink
fix(types): change ComponentOptions to DefineComponent (#1499)
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Oct 17, 2022
1 parent 946c579 commit 5711660
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/client/shim.d.ts
Expand Up @@ -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' {
Expand Down
23 changes: 12 additions & 11 deletions theme.d.ts
@@ -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
Expand Down

0 comments on commit 5711660

Please sign in to comment.