Skip to content

Commit 5711660

Browse files
authored
fix(types): change ComponentOptions to DefineComponent (vuejs#1499)
1 parent 946c579 commit 5711660

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

src/client/shim.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ declare const __CARBON__: boolean
44
declare const __VUE_PROD_DEVTOOLS__: boolean
55

66
declare module '*.vue' {
7-
import { ComponentOptions } from 'vue'
8-
const comp: ComponentOptions
9-
export default comp
7+
import type { DefineComponent } from 'vue'
8+
const component: DefineComponent
9+
export default component
1010
}
1111

1212
declare module '@siteData' {

theme.d.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
// so that users can do `import DefaultTheme from 'vitepress/theme'`
2-
import type { ComponentOptions } from 'vue'
2+
import type { DefineComponent } from 'vue'
33

4-
export const VPHomeHero: ComponentOptions
5-
export const VPHomeFeatures: ComponentOptions
6-
export const VPHomeSponsors: ComponentOptions
7-
export const VPDocAsideSponsors: ComponentOptions
8-
export const VPTeamPage: ComponentOptions
9-
export const VPTeamPageTitle: ComponentOptions
10-
export const VPTeamPageSection: ComponentOptions
11-
export const VPTeamMembers: ComponentOptions
4+
// TODO: add props for these
5+
export const VPHomeHero: DefineComponent
6+
export const VPHomeFeatures: DefineComponent
7+
export const VPHomeSponsors: DefineComponent
8+
export const VPDocAsideSponsors: DefineComponent
9+
export const VPTeamPage: DefineComponent
10+
export const VPTeamPageTitle: DefineComponent
11+
export const VPTeamPageSection: DefineComponent
12+
export const VPTeamMembers: DefineComponent
1213

1314
declare const theme: {
14-
Layout: ComponentOptions
15-
NotFound: ComponentOptions
15+
Layout: DefineComponent
16+
NotFound: DefineComponent
1617
}
1718

1819
export default theme

0 commit comments

Comments
 (0)