3
3
exports [` $ unwrapping 1` ] = `
4
4
"
5
5
import { ref , shallowRef } from 'vue'
6
- let foo = ( ref() )
7
- export let a = ( ref(1) )
8
- let b = ( shallowRef({
6
+ let foo = ref()
7
+ export let a = ref(1)
8
+ let b = shallowRef({
9
9
count : 0
10
- } ))
10
+ } )
11
11
let c = () => { }
12
12
let d
13
- label: var e = ( ref() )
13
+ label: var e = ref()
14
14
"
15
15
` ;
16
16
17
17
exports [` $$ 1` ] = `
18
18
"import { ref as _ref } from 'vue'
19
19
20
20
let a = _ref(1)
21
- const b = (a)
22
- const c = ({ a } )
23
- callExternal((a))
21
+ let count = 0
22
+ const b = a
23
+ const c = { a }
24
+ (count++,count)
25
+ callExternal(a)
24
26
"
25
27
` ;
26
28
@@ -59,7 +61,7 @@ exports[`accessing ref binding 1`] = `
59
61
exports [` array destructure 1` ] = `
60
62
"import { ref as _ref , toRef as _toRef } from 'vue'
61
63
62
- let n = _ref(1), __$temp_1 = ( useFoo() ),
64
+ let n = _ref(1), __$temp_1 = useFoo(),
63
65
a = _toRef(__$temp_1, 0),
64
66
b = _toRef(__$temp_1, 1, 1)
65
67
console.log(n.value, a.value, b.value)
@@ -88,7 +90,7 @@ exports[`macro import alias and removal 1`] = `
88
90
89
91
90
92
let a = _ref(1)
91
- const __$temp_1 = ( useMouse() ),
93
+ const __$temp_1 = useMouse(),
92
94
x = _toRef(__$temp_1, 'x'),
93
95
y = _toRef(__$temp_1, 'y')
94
96
"
@@ -129,9 +131,9 @@ exports[`mutating ref binding 1`] = `
129
131
exports[`nested destructure 1`] = `
130
132
"import { toRef as _toRef } from 'vue'
131
133
132
- let __$temp_1 = ( useFoo() ),
134
+ let __$temp_1 = useFoo(),
133
135
b = _toRef(__$temp_1[0].a, 'b')
134
- let __$temp_2 = ( useBar() ),
136
+ let __$temp_2 = useBar(),
135
137
d = _toRef(__$temp_2.c, 0),
136
138
e = _toRef(__$temp_2.c, 1)
137
139
console.log(b.value, d.value, e.value)
@@ -170,21 +172,21 @@ exports[`nested scopes 1`] = `
170
172
a.value++ // if block a
171
173
}
172
174
173
- return ( { a , b , c , d })
175
+ return { a , b , c , d }
174
176
}
175
177
"
176
178
`;
177
179
178
180
exports[`object destructure 1`] = `
179
181
"import { ref as _ref , toRef as _toRef } from 'vue'
180
182
181
- let n = _ref(1), __$temp_1 = ( useFoo() ),
183
+ let n = _ref(1), __$temp_1 = useFoo(),
182
184
a = _toRef(__$temp_1, 'a'),
183
185
c = _toRef(__$temp_1, 'b'),
184
186
d = _toRef(__$temp_1, 'd', 1),
185
187
f = _toRef(__$temp_1, 'e', 2),
186
188
h = _toRef(__$temp_1, g)
187
- let __$temp_2 = ( useSomething(() => 1) ),
189
+ let __$temp_2 = useSomething(() => 1),
188
190
foo = _toRef(__$temp_2, 'foo');
189
191
console.log(n.value, a.value, c.value, d.value, f.value, h.value, foo.value)
190
192
"
@@ -193,7 +195,7 @@ exports[`object destructure 1`] = `
193
195
exports[`object destructure w/ mid-path default values 1`] = `
194
196
"import { toRef as _toRef } from 'vue'
195
197
196
- const __$temp_1 = ( useFoo() ),
198
+ const __$temp_1 = useFoo(),
197
199
b = _toRef((__$temp_1.a || { b : 123 } ), 'b')
198
200
console.log(b.value)
199
201
"
0 commit comments