@vue/reactivity 3.1.0 → 3.1.4
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/dist/reactivity.cjs.js +114 -101
- package/dist/reactivity.cjs.prod.js +114 -101
- package/dist/reactivity.d.ts +1 -1
- package/dist/reactivity.esm-browser.js +114 -101
- package/dist/reactivity.esm-browser.prod.js +1 -1
- package/dist/reactivity.esm-bundler.js +114 -101
- package/dist/reactivity.global.js +114 -101
- package/dist/reactivity.global.prod.js +1 -1
- package/package.json +2 -2
package/dist/reactivity.cjs.js
CHANGED
|
@@ -201,34 +201,38 @@ const get = /*#__PURE__*/ createGetter();
|
|
|
201
201
|
const shallowGet = /*#__PURE__*/ createGetter(false, true);
|
|
202
202
|
const readonlyGet = /*#__PURE__*/ createGetter(true);
|
|
203
203
|
const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true);
|
|
204
|
-
const arrayInstrumentations =
|
|
205
|
-
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
204
|
+
const arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations();
|
|
205
|
+
function createArrayInstrumentations() {
|
|
206
|
+
const instrumentations = {};
|
|
207
|
+
['includes', 'indexOf', 'lastIndexOf'].forEach(key => {
|
|
208
|
+
const method = Array.prototype[key];
|
|
209
|
+
instrumentations[key] = function (...args) {
|
|
210
|
+
const arr = toRaw(this);
|
|
211
|
+
for (let i = 0, l = this.length; i < l; i++) {
|
|
212
|
+
track(arr, "get" /* GET */, i + '');
|
|
213
|
+
}
|
|
214
|
+
// we run the method using the original args first (which may be reactive)
|
|
215
|
+
const res = method.apply(arr, args);
|
|
216
|
+
if (res === -1 || res === false) {
|
|
217
|
+
// if that didn't work, run it again using raw values.
|
|
218
|
+
return method.apply(arr, args.map(toRaw));
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
return res;
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
});
|
|
225
|
+
['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => {
|
|
226
|
+
const method = Array.prototype[key];
|
|
227
|
+
instrumentations[key] = function (...args) {
|
|
228
|
+
pauseTracking();
|
|
229
|
+
const res = method.apply(this, args);
|
|
230
|
+
resetTracking();
|
|
219
231
|
return res;
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
const method = Array.prototype[key];
|
|
225
|
-
arrayInstrumentations[key] = function (...args) {
|
|
226
|
-
pauseTracking();
|
|
227
|
-
const res = method.apply(this, args);
|
|
228
|
-
resetTracking();
|
|
229
|
-
return res;
|
|
230
|
-
};
|
|
231
|
-
});
|
|
232
|
+
};
|
|
233
|
+
});
|
|
234
|
+
return instrumentations;
|
|
235
|
+
}
|
|
232
236
|
function createGetter(isReadonly = false, shallow = false) {
|
|
233
237
|
return function get(target, key, receiver) {
|
|
234
238
|
if (key === "__v_isReactive" /* IS_REACTIVE */) {
|
|
@@ -347,14 +351,14 @@ const readonlyHandlers = {
|
|
|
347
351
|
return true;
|
|
348
352
|
}
|
|
349
353
|
};
|
|
350
|
-
const shallowReactiveHandlers = shared.extend({}, mutableHandlers, {
|
|
354
|
+
const shallowReactiveHandlers = /*#__PURE__*/ shared.extend({}, mutableHandlers, {
|
|
351
355
|
get: shallowGet,
|
|
352
356
|
set: shallowSet
|
|
353
357
|
});
|
|
354
358
|
// Props handlers are special in the sense that it should not unwrap top-level
|
|
355
359
|
// refs (in order to allow refs to be explicitly passed down), but should
|
|
356
360
|
// retain the reactivity of the normal readonly object.
|
|
357
|
-
const shallowReadonlyHandlers = shared.extend({}, readonlyHandlers, {
|
|
361
|
+
const shallowReadonlyHandlers = /*#__PURE__*/ shared.extend({}, readonlyHandlers, {
|
|
358
362
|
get: shallowReadonlyGet
|
|
359
363
|
});
|
|
360
364
|
|
|
@@ -524,73 +528,82 @@ function createReadonlyMethod(type) {
|
|
|
524
528
|
return type === "delete" /* DELETE */ ? false : this;
|
|
525
529
|
};
|
|
526
530
|
}
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
iteratorMethods
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
531
|
+
function createInstrumentations() {
|
|
532
|
+
const mutableInstrumentations = {
|
|
533
|
+
get(key) {
|
|
534
|
+
return get$1(this, key);
|
|
535
|
+
},
|
|
536
|
+
get size() {
|
|
537
|
+
return size(this);
|
|
538
|
+
},
|
|
539
|
+
has: has$1,
|
|
540
|
+
add,
|
|
541
|
+
set: set$1,
|
|
542
|
+
delete: deleteEntry,
|
|
543
|
+
clear,
|
|
544
|
+
forEach: createForEach(false, false)
|
|
545
|
+
};
|
|
546
|
+
const shallowInstrumentations = {
|
|
547
|
+
get(key) {
|
|
548
|
+
return get$1(this, key, false, true);
|
|
549
|
+
},
|
|
550
|
+
get size() {
|
|
551
|
+
return size(this);
|
|
552
|
+
},
|
|
553
|
+
has: has$1,
|
|
554
|
+
add,
|
|
555
|
+
set: set$1,
|
|
556
|
+
delete: deleteEntry,
|
|
557
|
+
clear,
|
|
558
|
+
forEach: createForEach(false, true)
|
|
559
|
+
};
|
|
560
|
+
const readonlyInstrumentations = {
|
|
561
|
+
get(key) {
|
|
562
|
+
return get$1(this, key, true);
|
|
563
|
+
},
|
|
564
|
+
get size() {
|
|
565
|
+
return size(this, true);
|
|
566
|
+
},
|
|
567
|
+
has(key) {
|
|
568
|
+
return has$1.call(this, key, true);
|
|
569
|
+
},
|
|
570
|
+
add: createReadonlyMethod("add" /* ADD */),
|
|
571
|
+
set: createReadonlyMethod("set" /* SET */),
|
|
572
|
+
delete: createReadonlyMethod("delete" /* DELETE */),
|
|
573
|
+
clear: createReadonlyMethod("clear" /* CLEAR */),
|
|
574
|
+
forEach: createForEach(true, false)
|
|
575
|
+
};
|
|
576
|
+
const shallowReadonlyInstrumentations = {
|
|
577
|
+
get(key) {
|
|
578
|
+
return get$1(this, key, true, true);
|
|
579
|
+
},
|
|
580
|
+
get size() {
|
|
581
|
+
return size(this, true);
|
|
582
|
+
},
|
|
583
|
+
has(key) {
|
|
584
|
+
return has$1.call(this, key, true);
|
|
585
|
+
},
|
|
586
|
+
add: createReadonlyMethod("add" /* ADD */),
|
|
587
|
+
set: createReadonlyMethod("set" /* SET */),
|
|
588
|
+
delete: createReadonlyMethod("delete" /* DELETE */),
|
|
589
|
+
clear: createReadonlyMethod("clear" /* CLEAR */),
|
|
590
|
+
forEach: createForEach(true, true)
|
|
591
|
+
};
|
|
592
|
+
const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator];
|
|
593
|
+
iteratorMethods.forEach(method => {
|
|
594
|
+
mutableInstrumentations[method] = createIterableMethod(method, false, false);
|
|
595
|
+
readonlyInstrumentations[method] = createIterableMethod(method, true, false);
|
|
596
|
+
shallowInstrumentations[method] = createIterableMethod(method, false, true);
|
|
597
|
+
shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true);
|
|
598
|
+
});
|
|
599
|
+
return [
|
|
600
|
+
mutableInstrumentations,
|
|
601
|
+
readonlyInstrumentations,
|
|
602
|
+
shallowInstrumentations,
|
|
603
|
+
shallowReadonlyInstrumentations
|
|
604
|
+
];
|
|
605
|
+
}
|
|
606
|
+
const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations();
|
|
594
607
|
function createInstrumentationGetter(isReadonly, shallow) {
|
|
595
608
|
const instrumentations = shallow
|
|
596
609
|
? isReadonly
|
|
@@ -615,16 +628,16 @@ function createInstrumentationGetter(isReadonly, shallow) {
|
|
|
615
628
|
};
|
|
616
629
|
}
|
|
617
630
|
const mutableCollectionHandlers = {
|
|
618
|
-
get: createInstrumentationGetter(false, false)
|
|
631
|
+
get: /*#__PURE__*/ createInstrumentationGetter(false, false)
|
|
619
632
|
};
|
|
620
633
|
const shallowCollectionHandlers = {
|
|
621
|
-
get: createInstrumentationGetter(false, true)
|
|
634
|
+
get: /*#__PURE__*/ createInstrumentationGetter(false, true)
|
|
622
635
|
};
|
|
623
636
|
const readonlyCollectionHandlers = {
|
|
624
|
-
get: createInstrumentationGetter(true, false)
|
|
637
|
+
get: /*#__PURE__*/ createInstrumentationGetter(true, false)
|
|
625
638
|
};
|
|
626
639
|
const shallowReadonlyCollectionHandlers = {
|
|
627
|
-
get: createInstrumentationGetter(true, true)
|
|
640
|
+
get: /*#__PURE__*/ createInstrumentationGetter(true, true)
|
|
628
641
|
};
|
|
629
642
|
function checkIdentityKeys(target, has, key) {
|
|
630
643
|
const rawKey = toRaw(key);
|
|
@@ -750,7 +763,7 @@ function shallowRef(value) {
|
|
|
750
763
|
return createRef(value, true);
|
|
751
764
|
}
|
|
752
765
|
class RefImpl {
|
|
753
|
-
constructor(_rawValue, _shallow
|
|
766
|
+
constructor(_rawValue, _shallow) {
|
|
754
767
|
this._rawValue = _rawValue;
|
|
755
768
|
this._shallow = _shallow;
|
|
756
769
|
this.__v_isRef = true;
|
|
@@ -182,34 +182,38 @@ const get = /*#__PURE__*/ createGetter();
|
|
|
182
182
|
const shallowGet = /*#__PURE__*/ createGetter(false, true);
|
|
183
183
|
const readonlyGet = /*#__PURE__*/ createGetter(true);
|
|
184
184
|
const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true);
|
|
185
|
-
const arrayInstrumentations =
|
|
186
|
-
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
185
|
+
const arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations();
|
|
186
|
+
function createArrayInstrumentations() {
|
|
187
|
+
const instrumentations = {};
|
|
188
|
+
['includes', 'indexOf', 'lastIndexOf'].forEach(key => {
|
|
189
|
+
const method = Array.prototype[key];
|
|
190
|
+
instrumentations[key] = function (...args) {
|
|
191
|
+
const arr = toRaw(this);
|
|
192
|
+
for (let i = 0, l = this.length; i < l; i++) {
|
|
193
|
+
track(arr, "get" /* GET */, i + '');
|
|
194
|
+
}
|
|
195
|
+
// we run the method using the original args first (which may be reactive)
|
|
196
|
+
const res = method.apply(arr, args);
|
|
197
|
+
if (res === -1 || res === false) {
|
|
198
|
+
// if that didn't work, run it again using raw values.
|
|
199
|
+
return method.apply(arr, args.map(toRaw));
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
return res;
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
});
|
|
206
|
+
['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => {
|
|
207
|
+
const method = Array.prototype[key];
|
|
208
|
+
instrumentations[key] = function (...args) {
|
|
209
|
+
pauseTracking();
|
|
210
|
+
const res = method.apply(this, args);
|
|
211
|
+
resetTracking();
|
|
200
212
|
return res;
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
const method = Array.prototype[key];
|
|
206
|
-
arrayInstrumentations[key] = function (...args) {
|
|
207
|
-
pauseTracking();
|
|
208
|
-
const res = method.apply(this, args);
|
|
209
|
-
resetTracking();
|
|
210
|
-
return res;
|
|
211
|
-
};
|
|
212
|
-
});
|
|
213
|
+
};
|
|
214
|
+
});
|
|
215
|
+
return instrumentations;
|
|
216
|
+
}
|
|
213
217
|
function createGetter(isReadonly = false, shallow = false) {
|
|
214
218
|
return function get(target, key, receiver) {
|
|
215
219
|
if (key === "__v_isReactive" /* IS_REACTIVE */) {
|
|
@@ -322,14 +326,14 @@ const readonlyHandlers = {
|
|
|
322
326
|
return true;
|
|
323
327
|
}
|
|
324
328
|
};
|
|
325
|
-
const shallowReactiveHandlers = shared.extend({}, mutableHandlers, {
|
|
329
|
+
const shallowReactiveHandlers = /*#__PURE__*/ shared.extend({}, mutableHandlers, {
|
|
326
330
|
get: shallowGet,
|
|
327
331
|
set: shallowSet
|
|
328
332
|
});
|
|
329
333
|
// Props handlers are special in the sense that it should not unwrap top-level
|
|
330
334
|
// refs (in order to allow refs to be explicitly passed down), but should
|
|
331
335
|
// retain the reactivity of the normal readonly object.
|
|
332
|
-
const shallowReadonlyHandlers = shared.extend({}, readonlyHandlers, {
|
|
336
|
+
const shallowReadonlyHandlers = /*#__PURE__*/ shared.extend({}, readonlyHandlers, {
|
|
333
337
|
get: shallowReadonlyGet
|
|
334
338
|
});
|
|
335
339
|
|
|
@@ -485,73 +489,82 @@ function createReadonlyMethod(type) {
|
|
|
485
489
|
return type === "delete" /* DELETE */ ? false : this;
|
|
486
490
|
};
|
|
487
491
|
}
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
iteratorMethods
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
492
|
+
function createInstrumentations() {
|
|
493
|
+
const mutableInstrumentations = {
|
|
494
|
+
get(key) {
|
|
495
|
+
return get$1(this, key);
|
|
496
|
+
},
|
|
497
|
+
get size() {
|
|
498
|
+
return size(this);
|
|
499
|
+
},
|
|
500
|
+
has: has$1,
|
|
501
|
+
add,
|
|
502
|
+
set: set$1,
|
|
503
|
+
delete: deleteEntry,
|
|
504
|
+
clear,
|
|
505
|
+
forEach: createForEach(false, false)
|
|
506
|
+
};
|
|
507
|
+
const shallowInstrumentations = {
|
|
508
|
+
get(key) {
|
|
509
|
+
return get$1(this, key, false, true);
|
|
510
|
+
},
|
|
511
|
+
get size() {
|
|
512
|
+
return size(this);
|
|
513
|
+
},
|
|
514
|
+
has: has$1,
|
|
515
|
+
add,
|
|
516
|
+
set: set$1,
|
|
517
|
+
delete: deleteEntry,
|
|
518
|
+
clear,
|
|
519
|
+
forEach: createForEach(false, true)
|
|
520
|
+
};
|
|
521
|
+
const readonlyInstrumentations = {
|
|
522
|
+
get(key) {
|
|
523
|
+
return get$1(this, key, true);
|
|
524
|
+
},
|
|
525
|
+
get size() {
|
|
526
|
+
return size(this, true);
|
|
527
|
+
},
|
|
528
|
+
has(key) {
|
|
529
|
+
return has$1.call(this, key, true);
|
|
530
|
+
},
|
|
531
|
+
add: createReadonlyMethod("add" /* ADD */),
|
|
532
|
+
set: createReadonlyMethod("set" /* SET */),
|
|
533
|
+
delete: createReadonlyMethod("delete" /* DELETE */),
|
|
534
|
+
clear: createReadonlyMethod("clear" /* CLEAR */),
|
|
535
|
+
forEach: createForEach(true, false)
|
|
536
|
+
};
|
|
537
|
+
const shallowReadonlyInstrumentations = {
|
|
538
|
+
get(key) {
|
|
539
|
+
return get$1(this, key, true, true);
|
|
540
|
+
},
|
|
541
|
+
get size() {
|
|
542
|
+
return size(this, true);
|
|
543
|
+
},
|
|
544
|
+
has(key) {
|
|
545
|
+
return has$1.call(this, key, true);
|
|
546
|
+
},
|
|
547
|
+
add: createReadonlyMethod("add" /* ADD */),
|
|
548
|
+
set: createReadonlyMethod("set" /* SET */),
|
|
549
|
+
delete: createReadonlyMethod("delete" /* DELETE */),
|
|
550
|
+
clear: createReadonlyMethod("clear" /* CLEAR */),
|
|
551
|
+
forEach: createForEach(true, true)
|
|
552
|
+
};
|
|
553
|
+
const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator];
|
|
554
|
+
iteratorMethods.forEach(method => {
|
|
555
|
+
mutableInstrumentations[method] = createIterableMethod(method, false, false);
|
|
556
|
+
readonlyInstrumentations[method] = createIterableMethod(method, true, false);
|
|
557
|
+
shallowInstrumentations[method] = createIterableMethod(method, false, true);
|
|
558
|
+
shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true);
|
|
559
|
+
});
|
|
560
|
+
return [
|
|
561
|
+
mutableInstrumentations,
|
|
562
|
+
readonlyInstrumentations,
|
|
563
|
+
shallowInstrumentations,
|
|
564
|
+
shallowReadonlyInstrumentations
|
|
565
|
+
];
|
|
566
|
+
}
|
|
567
|
+
const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations();
|
|
555
568
|
function createInstrumentationGetter(isReadonly, shallow) {
|
|
556
569
|
const instrumentations = shallow
|
|
557
570
|
? isReadonly
|
|
@@ -576,16 +589,16 @@ function createInstrumentationGetter(isReadonly, shallow) {
|
|
|
576
589
|
};
|
|
577
590
|
}
|
|
578
591
|
const mutableCollectionHandlers = {
|
|
579
|
-
get: createInstrumentationGetter(false, false)
|
|
592
|
+
get: /*#__PURE__*/ createInstrumentationGetter(false, false)
|
|
580
593
|
};
|
|
581
594
|
const shallowCollectionHandlers = {
|
|
582
|
-
get: createInstrumentationGetter(false, true)
|
|
595
|
+
get: /*#__PURE__*/ createInstrumentationGetter(false, true)
|
|
583
596
|
};
|
|
584
597
|
const readonlyCollectionHandlers = {
|
|
585
|
-
get: createInstrumentationGetter(true, false)
|
|
598
|
+
get: /*#__PURE__*/ createInstrumentationGetter(true, false)
|
|
586
599
|
};
|
|
587
600
|
const shallowReadonlyCollectionHandlers = {
|
|
588
|
-
get: createInstrumentationGetter(true, true)
|
|
601
|
+
get: /*#__PURE__*/ createInstrumentationGetter(true, true)
|
|
589
602
|
};
|
|
590
603
|
|
|
591
604
|
const reactiveMap = new WeakMap();
|
|
@@ -697,7 +710,7 @@ function shallowRef(value) {
|
|
|
697
710
|
return createRef(value, true);
|
|
698
711
|
}
|
|
699
712
|
class RefImpl {
|
|
700
|
-
constructor(_rawValue, _shallow
|
|
713
|
+
constructor(_rawValue, _shallow) {
|
|
701
714
|
this._rawValue = _rawValue;
|
|
702
715
|
this._shallow = _shallow;
|
|
703
716
|
this.__v_isRef = true;
|
package/dist/reactivity.d.ts
CHANGED
|
@@ -295,7 +295,7 @@ export declare const enum TriggerOpTypes {
|
|
|
295
295
|
|
|
296
296
|
export declare function triggerRef(ref: Ref): void;
|
|
297
297
|
|
|
298
|
-
export declare function unref<T>(ref: T
|
|
298
|
+
export declare function unref<T>(ref: T | Ref<T>): T;
|
|
299
299
|
|
|
300
300
|
export declare type UnwrapNestedRefs<T> = T extends Ref ? T : UnwrapRef<T>;
|
|
301
301
|
|