@@ -92,6 +92,7 @@ const cleanup = () => {
92
92
* `MountOptions` are modifying, including some Cypress specific options like `styles`.
93
93
* The return type is different. Instead of VueWrapper, it's Cypress.Chainable<VueWrapper<...>>.
94
94
*/
95
+
95
96
type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps
96
97
97
98
type ComponentMountingOptions < T > = T extends DefineComponent <
@@ -206,46 +207,47 @@ export function mount<
206
207
> &
207
208
Record < string , any >
208
209
) : Cypress . Chainable < {
210
+
209
211
wrapper : VueWrapper <
210
- InstanceType <
211
- DefineComponent <
212
- PropsOrPropOptions ,
213
- RawBindings ,
214
- D ,
215
- C ,
216
- M ,
217
- Mixin ,
218
- Extends ,
219
- E ,
220
- EE ,
221
- PP ,
222
- Props ,
223
- Defaults
224
- >
212
+ InstanceType <
213
+ DefineComponent <
214
+ PropsOrPropOptions ,
215
+ RawBindings ,
216
+ D ,
217
+ C ,
218
+ M ,
219
+ Mixin ,
220
+ Extends ,
221
+ E ,
222
+ EE ,
223
+ PP ,
224
+ Props ,
225
+ Defaults
225
226
>
226
227
>
228
+ >
227
229
component : VueWrapper <
228
- InstanceType <
229
- DefineComponent <
230
- PropsOrPropOptions ,
231
- RawBindings ,
232
- D ,
233
- C ,
234
- M ,
235
- Mixin ,
236
- Extends ,
237
- E ,
238
- EE ,
239
- PP ,
240
- Props ,
241
- Defaults
242
- >
230
+ InstanceType <
231
+ DefineComponent <
232
+ PropsOrPropOptions ,
233
+ RawBindings ,
234
+ D ,
235
+ C ,
236
+ M ,
237
+ Mixin ,
238
+ Extends ,
239
+ E ,
240
+ EE ,
241
+ PP ,
242
+ Props ,
243
+ Defaults
243
244
>
244
- > [ 'vm' ] }
245
- >
245
+ >
246
+ > [ 'vm' ]
247
+ } >
246
248
247
249
// component declared by vue-tsc ScriptSetup
248
- export function mount < T extends DefineComponent < any , any , any , any > > (
250
+ export function mount < T extends DefineComponent < any , any , any , any , any > > (
249
251
component : T ,
250
252
options ?: ComponentMountingOptions < T >
251
253
) : Cypress . Chainable < {
@@ -278,9 +280,17 @@ export function mount<
278
280
> ,
279
281
options ?: MountingOptions < Props & PublicProps , D >
280
282
) : Cypress . Chainable < {
281
- wrapper : VueWrapper < ComponentPublicInstance < Props , RawBindings , D , C , M , E , VNodeProps & Props > >
282
- component : VueWrapper < ComponentPublicInstance < Props , RawBindings , D , C , M , E , VNodeProps & Props > > [ 'vm' ]
283
- } > & Record < string , any >
283
+ wrapper : VueWrapper <
284
+
285
+ ComponentPublicInstance < Props , RawBindings , D , C , M , E , VNodeProps & Props >
286
+ > &
287
+ Record < string , any >
288
+ component : VueWrapper <
289
+
290
+ ComponentPublicInstance < Props , RawBindings , D , C , M , E , VNodeProps & Props >
291
+ > &
292
+ Record < string , any > [ 'vm' ]
293
+ } >
284
294
285
295
// Component declared with { props: [] }
286
296
export function mount <
@@ -343,27 +353,27 @@ export function mount<
343
353
options ?: MountingOptions < ExtractPropTypes < PropsOptions > & PublicProps , D >
344
354
) : Cypress . Chainable < {
345
355
wrapper : VueWrapper <
346
- ComponentPublicInstance <
347
- ExtractPropTypes < PropsOptions > ,
348
- RawBindings ,
349
- D ,
350
- C ,
351
- M ,
352
- E ,
353
- VNodeProps & ExtractPropTypes < PropsOptions >
354
- >
356
+ ComponentPublicInstance <
357
+ ExtractPropTypes < PropsOptions > ,
358
+ RawBindings ,
359
+ D ,
360
+ C ,
361
+ M ,
362
+ E ,
363
+ VNodeProps & ExtractPropTypes < PropsOptions >
355
364
>
365
+ >
356
366
component : VueWrapper <
357
- ComponentPublicInstance <
358
- ExtractPropTypes < PropsOptions > ,
359
- RawBindings ,
360
- D ,
361
- C ,
362
- M ,
363
- E ,
364
- VNodeProps & ExtractPropTypes < PropsOptions >
365
- >
366
- > [ 'vm' ]
367
+ ComponentPublicInstance <
368
+ ExtractPropTypes < PropsOptions > ,
369
+ RawBindings ,
370
+ D ,
371
+ C ,
372
+ M ,
373
+ E ,
374
+ VNodeProps & ExtractPropTypes < PropsOptions >
375
+ >
376
+ > [ 'vm' ]
367
377
} >
368
378
369
379
/**
0 commit comments