Kaynağa Gözat

fix(types/reactivity): export ShallowRef type (#5026)

close #5205
三咲智子 4 yıl önce
ebeveyn
işleme
523b4b78f5

+ 1 - 0
packages/reactivity/src/index.ts

@@ -12,6 +12,7 @@ export {
   ToRef,
   ToRefs,
   UnwrapRef,
+  ShallowRef,
   ShallowUnwrapRef,
   RefUnwrapBailTypes
 } from './ref'

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

@@ -77,7 +77,7 @@ export function ref(value?: unknown) {
 
 declare const ShallowRefMarker: unique symbol
 
-type ShallowRef<T = any> = Ref<T> & { [ShallowRefMarker]?: true }
+export type ShallowRef<T = any> = Ref<T> & { [ShallowRefMarker]?: true }
 
 export function shallowRef<T extends object>(
   value: T