فهرست منبع

fix(types): shallowRef should not unwrap value type

Evan You 6 سال پیش
والد
کامیت
3206e5dfe5
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      packages/reactivity/src/ref.ts

+ 1 - 1
packages/reactivity/src/ref.ts

@@ -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)