fix(types): shallowRef should not unwrap value type

This commit is contained in:
Evan You 2020-02-25 20:43:01 -05:00
parent 9aaeeede62
commit 3206e5dfe5

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