Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): change ComponentOptions to DefineComponent #1499

Merged
merged 1 commit into from Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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