Skip to content

Commit fdbda1a

Browse files
types(shallowRef): simplified type
1 parent 01d82a7 commit fdbda1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/reactivity/src/ref.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export type ShallowRef<T = any> = Ref<T> & { [ShallowRefMarker]?: true }
116116
*/
117117
export function shallowRef<T>(
118118
value: T
119-
): 1 extends (T extends Ref ? 1 : 0)
119+
): Ref extends T
120120
? T extends Ref
121121
? IfAny<T, ShallowRef<T>, T>
122122
: ShallowRef<T>

0 commit comments

Comments
 (0)