@@ -45,8 +45,6 @@ import { trackInstance } from './utils/autoUnmount'
45
45
import { createVueWrapper } from './wrapperFactory'
46
46
47
47
// NOTE this should come from `vue`
48
- type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps
49
-
50
48
const MOUNT_OPTIONS : Array < keyof MountingOptions < any > > = [
51
49
'attachTo' ,
52
50
'attrs' ,
@@ -57,24 +55,6 @@ const MOUNT_OPTIONS: Array<keyof MountingOptions<any>> = [
57
55
'shallow'
58
56
]
59
57
60
- type ComponentMountingOptions < T > = T extends DefineComponent <
61
- infer PropsOrPropOptions ,
62
- any ,
63
- infer D ,
64
- any ,
65
- any
66
- >
67
- ? MountingOptions <
68
- Partial < ExtractDefaultPropTypes < PropsOrPropOptions > > &
69
- Omit <
70
- Readonly < ExtractPropTypes < PropsOrPropOptions > > & PublicProps ,
71
- keyof ExtractDefaultPropTypes < PropsOrPropOptions >
72
- > ,
73
- D
74
- > &
75
- Record < string , any >
76
- : MountingOptions < any >
77
-
78
58
function getInstanceOptions (
79
59
options : MountingOptions < any > & Record < string , any >
80
60
) : Record < string , any > {
@@ -94,6 +74,26 @@ function getInstanceOptions(
94
74
return resultOptions
95
75
}
96
76
77
+ type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps
78
+
79
+ type ComponentMountingOptions < T > = T extends DefineComponent <
80
+ infer PropsOrPropOptions ,
81
+ any ,
82
+ infer D ,
83
+ any ,
84
+ any
85
+ >
86
+ ? MountingOptions <
87
+ Partial < ExtractDefaultPropTypes < PropsOrPropOptions > > &
88
+ Omit <
89
+ Readonly < ExtractPropTypes < PropsOrPropOptions > > & PublicProps ,
90
+ keyof ExtractDefaultPropTypes < PropsOrPropOptions >
91
+ > ,
92
+ D
93
+ > &
94
+ Record < string , any >
95
+ : MountingOptions < any >
96
+
97
97
// Class component (without vue-class-component) - no props
98
98
export function mount < V extends { } > (
99
99
originalComponent : {
0 commit comments