File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,10 @@ type ShimSlotReturnType<T> = T extends (...args: infer P) => any
1616
1717type WithArray < T > = T | T [ ]
1818
19+ type ComponentData < T > = T extends { data ?( ...args : any ) : infer D } ? D : { }
20+
1921export type ComponentMountingOptions < T > = Omit <
20- MountingOptions < ComponentProps < T > > ,
22+ MountingOptions < ComponentProps < T > , ComponentData < T > > ,
2123 'slots'
2224> & {
2325 slots ?: {
@@ -45,7 +47,7 @@ export function mount<
4547> (
4648 originalComponent : T ,
4749 options ?: ComponentMountingOptions < C >
48- ) : VueWrapper < ComponentExposed < C > & ComponentProps < C > >
50+ ) : VueWrapper < ComponentExposed < C > & ComponentProps < C > & ComponentData < C > >
4951
5052// implementation
5153export function mount (
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ function createVMProxy<T extends ComponentPublicInstance>(
7070
7171export class VueWrapper <
7272 VM = unknown ,
73- T extends VM & ComponentPublicInstance = VM & ComponentPublicInstance
73+ T extends ComponentPublicInstance = VM & ComponentPublicInstance
7474> extends BaseWrapper < Node > {
7575 private readonly componentVM : T
7676 private readonly rootVM : ComponentPublicInstance | undefined | null
You can’t perform that action at this time.
0 commit comments