File tree 1 file changed +9
-9
lines changed
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -28,30 +28,30 @@ export function isRef(r: any): r is Ref {
28
28
return r ? r . _isRef === true : false
29
29
}
30
30
31
- export function ref < T extends Ref > ( raw : T ) : T
32
- export function ref < T > ( raw : T ) : Ref < T >
31
+ export function ref < T extends Ref > ( value : T ) : T
32
+ export function ref < T > ( value : T ) : Ref < T >
33
33
export function ref < T = any > ( ) : Ref < T >
34
- export function ref ( raw ?: unknown ) {
35
- if ( isRef ( raw ) ) {
36
- return raw
34
+ export function ref ( value ?: unknown ) {
35
+ if ( isRef ( value ) ) {
36
+ return value
37
37
}
38
- raw = convert ( raw )
38
+ value = convert ( value )
39
39
40
40
if ( __SSR__ ) {
41
41
return {
42
42
_isRef : true ,
43
- value : raw
43
+ value
44
44
}
45
45
}
46
46
47
47
const r = {
48
48
_isRef : true ,
49
49
get value ( ) {
50
50
track ( r , TrackOpTypes . GET , 'value' )
51
- return raw
51
+ return value
52
52
} ,
53
53
set value ( newVal ) {
54
- raw = convert ( newVal )
54
+ value = convert ( newVal )
55
55
trigger (
56
56
r ,
57
57
TriggerOpTypes . SET ,
You can’t perform that action at this time.
0 commit comments