vue 2.7.8 → 2.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types/vue.d.ts CHANGED
@@ -13,7 +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
+ import {
18
+ UnwrapMixinsType,
19
+ IntersectionMixin
20
+ } from './v3-component-public-instance'
21
+ import {
22
+ ExtractComputedReturns,
23
+ ComponentOptionsMixin
24
+ } from './v3-component-options'
17
25
 
18
26
  export interface CreateElement {
19
27
  (
@@ -100,12 +108,20 @@ export type CombinedVueInstance<
100
108
  Methods,
101
109
  Computed,
102
110
  Props,
103
- SetupBindings
104
- > = Data &
111
+ SetupBindings = {},
112
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,
113
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin,
114
+ PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>
115
+ > = UnwrapNestedRefs<UnwrapMixinsType<PublicMixin, 'D'>> &
116
+ Data &
117
+ UnwrapMixinsType<PublicMixin, 'M'> &
105
118
  Methods &
119
+ ExtractComputedReturns<UnwrapMixinsType<PublicMixin, 'C'>> &
106
120
  Computed &
121
+ UnwrapMixinsType<PublicMixin, 'P'> &
107
122
  Props &
108
123
  Instance &
124
+ ShallowUnwrapRef<UnwrapMixinsType<PublicMixin, 'B'>> &
109
125
  (SetupBindings extends void ? {} : SetupBindings)
110
126
 
111
127
  export type ExtendedVue<
@@ -114,9 +130,20 @@ export type ExtendedVue<
114
130
  Methods,
115
131
  Computed,
116
132
  Props,
117
- SetupBindings
133
+ SetupBindings = {},
134
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,
135
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin
118
136
  > = VueConstructor<
119
- CombinedVueInstance<Instance, Data, Methods, Computed, Props, SetupBindings> &
137
+ CombinedVueInstance<
138
+ Instance,
139
+ Data,
140
+ Methods,
141
+ Computed,
142
+ Props,
143
+ SetupBindings,
144
+ Mixin,
145
+ Extends
146
+ > &
120
147
  Vue
121
148
  >
122
149
 
@@ -142,7 +169,9 @@ export interface VueConstructor<V extends Vue = Vue> {
142
169
  Methods = object,
143
170
  Computed = object,
144
171
  PropNames extends string = never,
145
- SetupBindings = {}
172
+ SetupBindings = {},
173
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,
174
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin
146
175
  >(
147
176
  options?: ThisTypedComponentOptionsWithArrayProps<
148
177
  V,
@@ -150,7 +179,9 @@ export interface VueConstructor<V extends Vue = Vue> {
150
179
  Methods,
151
180
  Computed,
152
181
  PropNames,
153
- SetupBindings
182
+ SetupBindings,
183
+ Mixin,
184
+ Extends
154
185
  >
155
186
  ): CombinedVueInstance<
156
187
  V,
@@ -158,7 +189,9 @@ export interface VueConstructor<V extends Vue = Vue> {
158
189
  Methods,
159
190
  Computed,
160
191
  Record<PropNames, any>,
161
- SetupBindings
192
+ SetupBindings,
193
+ Mixin,
194
+ Extends
162
195
  >
163
196
 
164
197
  /**
@@ -172,7 +205,9 @@ export interface VueConstructor<V extends Vue = Vue> {
172
205
  Methods = object,
173
206
  Computed = object,
174
207
  Props = object,
175
- SetupBindings = {}
208
+ SetupBindings = {},
209
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,
210
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin
176
211
  >(
177
212
  options?: ThisTypedComponentOptionsWithRecordProps<
178
213
  V,
@@ -180,7 +215,9 @@ export interface VueConstructor<V extends Vue = Vue> {
180
215
  Methods,
181
216
  Computed,
182
217
  Props,
183
- SetupBindings
218
+ SetupBindings,
219
+ Mixin,
220
+ Extends
184
221
  >
185
222
  ): CombinedVueInstance<
186
223
  V,
@@ -188,7 +225,9 @@ export interface VueConstructor<V extends Vue = Vue> {
188
225
  Methods,
189
226
  Computed,
190
227
  Record<keyof Props, any>,
191
- SetupBindings
228
+ SetupBindings,
229
+ Mixin,
230
+ Extends
192
231
  >
193
232
 
194
233
  /**
@@ -211,7 +250,9 @@ export interface VueConstructor<V extends Vue = Vue> {
211
250
  Methods,
212
251
  Computed,
213
252
  PropNames extends string = never,
214
- SetupBindings = {}
253
+ SetupBindings = {},
254
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,
255
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin
215
256
  >(
216
257
  options?: ThisTypedComponentOptionsWithArrayProps<
217
258
  V,
@@ -219,7 +260,9 @@ export interface VueConstructor<V extends Vue = Vue> {
219
260
  Methods,
220
261
  Computed,
221
262
  PropNames,
222
- SetupBindings
263
+ SetupBindings,
264
+ Mixin,
265
+ Extends
223
266
  >
224
267
  ): ExtendedVue<
225
268
  V,
@@ -227,22 +270,43 @@ export interface VueConstructor<V extends Vue = Vue> {
227
270
  Methods,
228
271
  Computed,
229
272
  Record<PropNames, any>,
230
- SetupBindings
273
+ SetupBindings,
274
+ Mixin,
275
+ Extends
231
276
  >
232
277
 
233
278
  /**
234
279
  * extend with object props
235
280
  */
236
- extend<Data, Methods, Computed, Props, SetupBindings = {}>(
281
+ extend<
282
+ Data,
283
+ Methods,
284
+ Computed,
285
+ Props,
286
+ SetupBindings = {},
287
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,
288
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin
289
+ >(
237
290
  options?: ThisTypedComponentOptionsWithRecordProps<
238
291
  V,
239
292
  Data,
240
293
  Methods,
241
294
  Computed,
242
295
  Props,
243
- SetupBindings
296
+ SetupBindings,
297
+ Mixin,
298
+ Extends
244
299
  >
245
- ): ExtendedVue<V, Data, Methods, Computed, Props, SetupBindings>
300
+ ): ExtendedVue<
301
+ V,
302
+ Data,
303
+ Methods,
304
+ Computed,
305
+ Props,
306
+ SetupBindings,
307
+ Mixin,
308
+ Extends
309
+ >
246
310
 
247
311
  /**
248
312
  * extend with functional + array props
@@ -287,7 +351,9 @@ export interface VueConstructor<V extends Vue = Vue> {
287
351
  Methods,
288
352
  Computed,
289
353
  PropNames extends string = never,
290
- SetupBindings = {}
354
+ SetupBindings = {},
355
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,
356
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin
291
357
  >(
292
358
  id: string,
293
359
  definition?: ThisTypedComponentOptionsWithArrayProps<
@@ -296,7 +362,9 @@ export interface VueConstructor<V extends Vue = Vue> {
296
362
  Methods,
297
363
  Computed,
298
364
  PropNames,
299
- SetupBindings
365
+ SetupBindings,
366
+ Mixin,
367
+ Extends
300
368
  >
301
369
  ): ExtendedVue<
302
370
  V,
@@ -304,9 +372,19 @@ export interface VueConstructor<V extends Vue = Vue> {
304
372
  Methods,
305
373
  Computed,
306
374
  Record<PropNames, any>,
307
- SetupBindings
375
+ SetupBindings,
376
+ Mixin,
377
+ Extends
308
378
  >
309
- component<Data, Methods, Computed, Props, SetupBindings>(
379
+ component<
380
+ Data,
381
+ Methods,
382
+ Computed,
383
+ Props,
384
+ SetupBindings,
385
+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,
386
+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin
387
+ >(
310
388
  id: string,
311
389
  definition?: ThisTypedComponentOptionsWithRecordProps<
312
390
  V,
@@ -314,7 +392,9 @@ export interface VueConstructor<V extends Vue = Vue> {
314
392
  Methods,
315
393
  Computed,
316
394
  Props,
317
- SetupBindings
395
+ SetupBindings,
396
+ Mixin,
397
+ Extends
318
398
  >
319
399
  ): ExtendedVue<V, Data, Methods, Computed, Props, SetupBindings>
320
400
  component<PropNames extends string>(