@vue/reactivity 3.4.0-beta.2 → 3.4.0-beta.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.d.ts +2 -4
- package/package.json +2 -2
package/dist/reactivity.d.ts
CHANGED
|
@@ -451,9 +451,7 @@ export type ShallowRef<T = any> = Ref<T> & {
|
|
|
451
451
|
* @param value - The "inner value" for the shallow ref.
|
|
452
452
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowref}
|
|
453
453
|
*/
|
|
454
|
-
export declare function shallowRef<T>(value:
|
|
455
|
-
export declare function shallowRef<T extends Ref>(value: T): T;
|
|
456
|
-
export declare function shallowRef<T>(value: T): ShallowRef<T>;
|
|
454
|
+
export declare function shallowRef<T>(value: T): Ref extends T ? T extends Ref ? IfAny<T, ShallowRef<T>, T> : ShallowRef<T> : ShallowRef<T>;
|
|
457
455
|
export declare function shallowRef<T = any>(): ShallowRef<T | undefined>;
|
|
458
456
|
/**
|
|
459
457
|
* Force trigger effects that depends on a shallow ref. This is typically used
|
|
@@ -621,7 +619,7 @@ export type ShallowUnwrapRef<T> = {
|
|
|
621
619
|
export type UnwrapRef<T> = T extends ShallowRef<infer V> ? V : T extends Ref<infer V> ? UnwrapRefSimple<V> : UnwrapRefSimple<T>;
|
|
622
620
|
type UnwrapRefSimple<T> = T extends Function | BaseTypes | Ref | RefUnwrapBailTypes[keyof RefUnwrapBailTypes] | {
|
|
623
621
|
[RawSymbol]?: true;
|
|
624
|
-
} ? T : T extends Map<infer K, infer V> ? Map<K, UnwrapRefSimple<V>> : T extends WeakMap<infer K, infer V> ? WeakMap<K, UnwrapRefSimple<V>> : T extends Set<infer V> ? Set<UnwrapRefSimple<V>> : T extends WeakSet<infer V> ? WeakSet<UnwrapRefSimple<V>> : T extends ReadonlyArray<any> ? {
|
|
622
|
+
} ? T : T extends Map<infer K, infer V> ? Map<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Map<any, any>>> : T extends WeakMap<infer K, infer V> ? WeakMap<K, UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakMap<any, any>>> : T extends Set<infer V> ? Set<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof Set<any>>> : T extends WeakSet<infer V> ? WeakSet<UnwrapRefSimple<V>> & UnwrapRef<Omit<T, keyof WeakSet<any>>> : T extends ReadonlyArray<any> ? {
|
|
625
623
|
[K in keyof T]: UnwrapRefSimple<T[K]>;
|
|
626
624
|
} : T extends object & {
|
|
627
625
|
[ShallowReactiveMarker]?: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/reactivity",
|
|
3
|
-
"version": "3.4.0-beta.
|
|
3
|
+
"version": "3.4.0-beta.4",
|
|
4
4
|
"description": "@vue/reactivity",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/reactivity.esm-bundler.js",
|
|
@@ -36,6 +36,6 @@
|
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@vue/shared": "3.4.0-beta.
|
|
39
|
+
"@vue/shared": "3.4.0-beta.4"
|
|
40
40
|
}
|
|
41
41
|
}
|