]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(types): shallowRef should not unwrap value type
authorEvan You <yyx990803@gmail.com>
Wed, 26 Feb 2020 01:43:01 +0000 (20:43 -0500)
committerEvan You <yyx990803@gmail.com>
Wed, 26 Feb 2020 01:43:01 +0000 (20:43 -0500)
packages/reactivity/src/ref.ts

index dde3b82b7d630fd9ddda8beeb18042ef3064c607..48b3787f7af972c18954b4b8eac18ec4da1e2927 100644 (file)
@@ -34,7 +34,7 @@ export function ref(value?: unknown) {
   return createRef(value)
 }
 
-export function shallowRef<T>(value: T): T extends Ref ? T : Ref<UnwrapRef<T>>
+export function shallowRef<T>(value: T): T extends Ref ? T : Ref<T>
 export function shallowRef<T = any>(): Ref<T>
 export function shallowRef(value?: unknown) {
   return createRef(value, true)