File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,7 @@ export function isRef(r: any): r is Ref {
40
40
return ! ! ( r && ( r as Ref ) . __v_isRef === true )
41
41
}
42
42
43
- export function ref < T extends object > (
44
- value : T
45
- ) : [ T ] extends [ Ref ] ? T : Ref < UnwrapRef < T > >
43
+ export function ref < T extends Ref > ( value : T ) : T
46
44
export function ref < T > ( value : T ) : Ref < UnwrapRef < T > >
47
45
export function ref < T = any > ( ) : Ref < T | undefined >
48
46
export function ref ( value ?: unknown ) {
@@ -53,9 +51,8 @@ declare const ShallowRefMarker: unique symbol
53
51
54
52
export type ShallowRef < T = any > = Ref < T > & { [ ShallowRefMarker ] ?: true }
55
53
56
- export function shallowRef < T extends object > (
57
- value : T
58
- ) : [ T ] extends [ Ref ] ? T : ShallowRef < T >
54
+ export function shallowRef < T > ( value : T | Ref < T > ) : Ref < T > | ShallowRef < T >
55
+ export function shallowRef < T extends Ref > ( value : T ) : T
59
56
export function shallowRef < T > ( value : T ) : ShallowRef < T >
60
57
export function shallowRef < T = any > ( ) : ShallowRef < T | undefined >
61
58
export function shallowRef ( value ?: unknown ) {
You can’t perform that action at this time.
0 commit comments