Skip to content

Commit

Permalink
fix(types): shallowRef should not unwrap value type
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Feb 26, 2020
1 parent 9aaeeed commit 3206e5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/reactivity/src/ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3206e5d

Please sign in to comment.