File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,17 @@ export type PropType<T> = T;
6
6
7
7
// type FullPropType<T> = T extends { required: boolean } ? T : T | undefined;
8
8
9
- interface ComponentOptionsWithSetup < Props > extends Omit < ComponentOptions < Vue > , 'props' | 'setup' > {
9
+ type ComponentOptionsWithSetup < Props > = Omit < ComponentOptions < Vue > , 'props' | 'setup' > & {
10
10
props : Props ;
11
11
setup ?: (
12
12
this : undefined ,
13
13
props : { [ K in keyof Props ] : Props [ K ] } ,
14
14
context : Context
15
15
) => object | null | undefined | void ;
16
- }
16
+ } ;
17
17
18
- export function createComponent < Props > ( compOpions : ComponentOptionsWithSetup < Props > ) {
19
- return compOpions ;
18
+ export function createComponent < Props > (
19
+ compOpions : ComponentOptionsWithSetup < Props >
20
+ ) : ComponentOptions < Vue > {
21
+ return ( compOpions as any ) as ComponentOptions < Vue > ;
20
22
}
You can’t perform that action at this time.
0 commit comments