@@ -13,12 +13,15 @@ import {
13
13
import { VNode , VNodeData , VNodeChildren , NormalizedScopedSlot } from './vnode'
14
14
import { PluginFunction , PluginObject } from './plugin'
15
15
import { DefineComponent } from './v3-define-component'
16
- import { nextTick } from './v3-generated'
16
+ import { nextTick , UnwrapNestedRefs , ShallowUnwrapRef } from './v3-generated'
17
17
import {
18
18
UnwrapMixinsType ,
19
19
IntersectionMixin
20
20
} from './v3-component-public-instance'
21
- import { ExtractComputedReturns } from './v3-component-options'
21
+ import {
22
+ ExtractComputedReturns ,
23
+ ComponentOptionsMixin
24
+ } from './v3-component-options'
22
25
23
26
export interface CreateElement {
24
27
(
@@ -99,21 +102,17 @@ export interface Vue<
99
102
$createElement : CreateElement
100
103
}
101
104
102
- type ComponentMixin = ComponentOptions < any , any , any , any , any >
103
-
104
105
export type CombinedVueInstance <
105
106
Instance extends Vue ,
106
107
Data ,
107
108
Methods ,
108
109
Computed ,
109
110
Props ,
110
111
SetupBindings = { } ,
111
- Mixin extends ComponentMixin = ComponentMixin ,
112
- Extends extends ComponentMixin = ComponentMixin ,
113
- PublicMixin = IntersectionMixin < Mixin > &
114
- IntersectionMixin < Extends > &
115
- IntersectionMixin < ComponentOptions < any , any , any , any , any > > // prevent produce `never` in UnwrapMixinsType
116
- > = UnwrapMixinsType < PublicMixin , 'D' > &
112
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin ,
113
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin ,
114
+ PublicMixin = IntersectionMixin < Mixin > & IntersectionMixin < Extends >
115
+ > = UnwrapNestedRefs < UnwrapMixinsType < PublicMixin , 'D' > > &
117
116
Data &
118
117
UnwrapMixinsType < PublicMixin , 'M' > &
119
118
Methods &
@@ -122,7 +121,7 @@ export type CombinedVueInstance<
122
121
UnwrapMixinsType < PublicMixin , 'P' > &
123
122
Props &
124
123
Instance &
125
- UnwrapMixinsType < PublicMixin , 'B' > &
124
+ ShallowUnwrapRef < UnwrapMixinsType < PublicMixin , 'B' > > &
126
125
( SetupBindings extends void ? { } : SetupBindings )
127
126
128
127
export type ExtendedVue <
@@ -132,8 +131,8 @@ export type ExtendedVue<
132
131
Computed ,
133
132
Props ,
134
133
SetupBindings = { } ,
135
- Mixin extends ComponentMixin = ComponentMixin ,
136
- Extends extends ComponentMixin = ComponentMixin
134
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin ,
135
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin
137
136
> = VueConstructor <
138
137
CombinedVueInstance <
139
138
Instance ,
@@ -171,8 +170,8 @@ export interface VueConstructor<V extends Vue = Vue> {
171
170
Computed = object ,
172
171
PropNames extends string = never ,
173
172
SetupBindings = { } ,
174
- Mixin extends ComponentMixin = ComponentMixin ,
175
- Extends extends ComponentMixin = ComponentMixin
173
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin ,
174
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin
176
175
> (
177
176
options ?: ThisTypedComponentOptionsWithArrayProps <
178
177
V ,
@@ -207,8 +206,8 @@ export interface VueConstructor<V extends Vue = Vue> {
207
206
Computed = object ,
208
207
Props = object ,
209
208
SetupBindings = { } ,
210
- Mixin extends ComponentMixin = ComponentMixin ,
211
- Extends extends ComponentMixin = ComponentMixin
209
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin ,
210
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin
212
211
> (
213
212
options ?: ThisTypedComponentOptionsWithRecordProps <
214
213
V ,
@@ -252,8 +251,8 @@ export interface VueConstructor<V extends Vue = Vue> {
252
251
Computed ,
253
252
PropNames extends string = never ,
254
253
SetupBindings = { } ,
255
- Mixin extends ComponentMixin = ComponentMixin ,
256
- Extends extends ComponentMixin = ComponentMixin
254
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin ,
255
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin
257
256
> (
258
257
options ?: ThisTypedComponentOptionsWithArrayProps <
259
258
V ,
@@ -285,8 +284,8 @@ export interface VueConstructor<V extends Vue = Vue> {
285
284
Computed ,
286
285
Props ,
287
286
SetupBindings = { } ,
288
- Mixin extends ComponentMixin = ComponentMixin ,
289
- Extends extends ComponentMixin = ComponentMixin
287
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin ,
288
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin
290
289
> (
291
290
options ?: ThisTypedComponentOptionsWithRecordProps <
292
291
V ,
@@ -353,8 +352,8 @@ export interface VueConstructor<V extends Vue = Vue> {
353
352
Computed ,
354
353
PropNames extends string = never ,
355
354
SetupBindings = { } ,
356
- Mixin extends ComponentMixin = ComponentMixin ,
357
- Extends extends ComponentMixin = ComponentMixin
355
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin ,
356
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin
358
357
> (
359
358
id : string ,
360
359
definition ?: ThisTypedComponentOptionsWithArrayProps <
@@ -383,8 +382,8 @@ export interface VueConstructor<V extends Vue = Vue> {
383
382
Computed ,
384
383
Props ,
385
384
SetupBindings ,
386
- Mixin extends ComponentMixin = ComponentMixin ,
387
- Extends extends ComponentMixin = ComponentMixin
385
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin ,
386
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin
388
387
> (
389
388
id : string ,
390
389
definition ?: ThisTypedComponentOptionsWithRecordProps <
0 commit comments