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

close #5205
This commit is contained in:
三咲智子 2021-12-06 12:18:21 +08:00 committed by GitHub
parent 095fe269cb
commit 523b4b78f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

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

View File

@ -77,7 +77,7 @@ export function ref(value?: unknown) {
declare const ShallowRefMarker: unique symbol 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>( export function shallowRef<T extends object>(
value: T value: T