Skip to content

Commit 58638a5

Browse files
authored
Fixes shallowRef's return type
1 parent a9ca2d8 commit 58638a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/v3/reactivity/ref.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export type ShallowRef<T = any> = Ref<T> & { [ShallowRefMarker]?: true }
5555

5656
export function shallowRef<T extends object>(
5757
value: T
58-
): T extends Ref ? T : ShallowRef<T>
58+
): [T] extends [Ref] ? T : ShallowRef<T>
5959
export function shallowRef<T>(value: T): ShallowRef<T>
6060
export function shallowRef<T = any>(): ShallowRef<T | undefined>
6161
export function shallowRef(value?: unknown) {

0 commit comments

Comments
 (0)