]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(types/reactivity): export ShallowRef type (#5026)
author三咲智子 <sxzz@sxzz.moe>
Mon, 6 Dec 2021 04:18:21 +0000 (12:18 +0800)
committerGitHub <noreply@github.com>
Mon, 6 Dec 2021 04:18:21 +0000 (23:18 -0500)
close #5205

packages/reactivity/src/index.ts
packages/reactivity/src/ref.ts

index d608e8b8f3face22d8fa31238d5df15cf686387a..c61999bd6f39a82efa28772313bf6a97e753053c 100644 (file)
@@ -12,6 +12,7 @@ export {
   ToRef,
   ToRefs,
   UnwrapRef,
+  ShallowRef,
   ShallowUnwrapRef,
   RefUnwrapBailTypes
 } from './ref'
index 93eb4fa89b07a6d28c305a9f3a3cf4b6586e33e5..3e00541c743f3b62e582a6bc27804d8a85e2e983 100644 (file)
@@ -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