@@ -35,7 +35,6 @@ import { attachEmitListener } from './emitMixin'
35
35
import { createDataMixin } from './dataMixin'
36
36
import { MOUNT_COMPONENT_REF , MOUNT_PARENT_NAME } from './constants'
37
37
import { stubComponents } from './stubs'
38
- import { VueConstructor } from 'vue-class-component'
39
38
40
39
// NOTE this should come from `vue`
41
40
type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps
@@ -50,11 +49,24 @@ export type ObjectEmitsOptions = Record<
50
49
>
51
50
export type EmitsOptions = ObjectEmitsOptions | string [ ]
52
51
53
- // Class component
54
- export function mount (
55
- originalComponent : VueConstructor ,
52
+ // Class component - no props
53
+ export function mount < V > (
54
+ originalComponent : {
55
+ new ( ...args : any [ ] ) : V
56
+ registerHooks ( keys : string [ ] ) : void
57
+ } ,
56
58
options ?: MountingOptions < any >
57
- ) : VueWrapper < ComponentPublicInstance < any > >
59
+ ) : VueWrapper < ComponentPublicInstance < V > >
60
+
61
+ // Class component - props
62
+ export function mount < V , P > (
63
+ originalComponent : {
64
+ new ( ...args : any [ ] ) : V
65
+ props ( Props : P ) : any
66
+ registerHooks ( keys : string [ ] ) : void
67
+ } ,
68
+ options ?: MountingOptions < P >
69
+ ) : VueWrapper < ComponentPublicInstance < V > >
58
70
59
71
// Functional component with emits
60
72
export function mount < Props , E extends EmitsOptions = { } > (
0 commit comments