@@ -64,36 +64,20 @@ export type ObjectEmitsOptions = Record<
64
64
export type EmitsOptions = ObjectEmitsOptions | string [ ]
65
65
66
66
// Functional component
67
- export function mount < TestedComponent extends FunctionalComponent > (
67
+ export function mount <
68
+ TestedComponent extends FunctionalComponent < Props > ,
69
+ Props
70
+ > (
68
71
originalComponent : TestedComponent ,
69
- options ?: MountingOptions < any >
70
- ) : VueWrapper < ComponentPublicInstance >
72
+ options ?: MountingOptions < Props >
73
+ ) : VueWrapper < ComponentPublicInstance < Props > >
74
+
71
75
// Component declared with defineComponent
72
76
export function mount < TestedComponent extends ComponentPublicInstance > (
73
77
originalComponent : { new ( ) : TestedComponent } & Component ,
74
78
options ?: MountingOptions < TestedComponent [ '$props' ] , TestedComponent [ '$data' ] >
75
79
) : VueWrapper < TestedComponent >
76
80
77
- // Functional Component declared with (props, ctx)=> render
78
- export function mount < Props , RawBindings = object > (
79
- setup : (
80
- props : Readonly < Props > ,
81
- ctx : SetupContext
82
- ) => RawBindings | RenderFunction ,
83
-
84
- options : MountingOptions < Props , { } >
85
- ) : VueWrapper <
86
- ComponentPublicInstance <
87
- Props ,
88
- RawBindings ,
89
- { } ,
90
- { } ,
91
- { } ,
92
- // public props
93
- VNodeProps & Props
94
- >
95
- >
96
-
97
81
// Component declared with no props
98
82
export function mount <
99
83
Props = { } ,
0 commit comments