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
+ const b = a
22
+ const c = { a }
23
+ callExternal(a )
24
24
"
25
25
` ;
26
26
@@ -59,7 +59,7 @@ exports[`accessing ref binding 1`] = `
59
59
exports [` array destructure 1` ] = `
60
60
"import { ref as _ref , toRef as _toRef } from 'vue'
61
61
62
- let n = _ref(1), __$temp_1 = ( useFoo() ),
62
+ let n = _ref(1), __$temp_1 = useFoo(),
63
63
a = _toRef(__$temp_1, 0),
64
64
b = _toRef(__$temp_1, 1, 1)
65
65
console.log(n.value, a.value, b.value)
@@ -88,7 +88,7 @@ exports[`macro import alias and removal 1`] = `
88
88
89
89
90
90
let a = _ref(1)
91
- const __$temp_1 = ( useMouse() ),
91
+ const __$temp_1 = useMouse(),
92
92
x = _toRef(__$temp_1, 'x'),
93
93
y = _toRef(__$temp_1, 'y')
94
94
"
@@ -129,9 +129,9 @@ exports[`mutating ref binding 1`] = `
129
129
exports[`nested destructure 1`] = `
130
130
"import { toRef as _toRef } from 'vue'
131
131
132
- let __$temp_1 = ( useFoo() ),
132
+ let __$temp_1 = useFoo(),
133
133
b = _toRef(__$temp_1[0].a, 'b')
134
- let __$temp_2 = ( useBar() ),
134
+ let __$temp_2 = useBar(),
135
135
d = _toRef(__$temp_2.c, 0),
136
136
e = _toRef(__$temp_2.c, 1)
137
137
console.log(b.value, d.value, e.value)
@@ -170,21 +170,21 @@ exports[`nested scopes 1`] = `
170
170
a.value++ // if block a
171
171
}
172
172
173
- return ( { a , b , c , d })
173
+ return { a , b , c , d }
174
174
}
175
175
"
176
176
`;
177
177
178
178
exports[`object destructure 1`] = `
179
179
"import { ref as _ref , toRef as _toRef } from 'vue'
180
180
181
- let n = _ref(1), __$temp_1 = ( useFoo() ),
181
+ let n = _ref(1), __$temp_1 = useFoo(),
182
182
a = _toRef(__$temp_1, 'a'),
183
183
c = _toRef(__$temp_1, 'b'),
184
184
d = _toRef(__$temp_1, 'd', 1),
185
185
f = _toRef(__$temp_1, 'e', 2),
186
186
h = _toRef(__$temp_1, g)
187
- let __$temp_2 = ( useSomething(() => 1) ),
187
+ let __$temp_2 = useSomething(() => 1),
188
188
foo = _toRef(__$temp_2, 'foo');
189
189
console.log(n.value, a.value, c.value, d.value, f.value, h.value, foo.value)
190
190
"
@@ -193,7 +193,7 @@ exports[`object destructure 1`] = `
193
193
exports[`object destructure w/ mid-path default values 1`] = `
194
194
"import { toRef as _toRef } from 'vue'
195
195
196
- const __$temp_1 = ( useFoo() ),
196
+ const __$temp_1 = useFoo(),
197
197
b = _toRef((__$temp_1.a || { b : 123 } ), 'b')
198
198
console.log(b.value)
199
199
"
0 commit comments