chore: type [ci skip]
This commit is contained in:
@@ -85,7 +85,7 @@ exports[`handle TS casting syntax 1`] = `
|
||||
exports[`macro import alias and removal 1`] = `
|
||||
"import { ref as _ref, toRef as _toRef } from 'vue'
|
||||
|
||||
|
||||
|
||||
|
||||
let a = _ref(1)
|
||||
const __$temp_1 = (useMouse()),
|
||||
@@ -184,7 +184,7 @@ exports[`object destructure 1`] = `
|
||||
d = _toRef(__$temp_1, 'd', 1),
|
||||
f = _toRef(__$temp_1, 'e', 2),
|
||||
h = _toRef(__$temp_1, g)
|
||||
let __$temp_2 = (useSomthing(() => 1)),
|
||||
let __$temp_2 = (useSomething(() => 1)),
|
||||
foo = _toRef(__$temp_2, 'foo');
|
||||
console.log(n.value, a.value, c.value, d.value, f.value, h.value, foo.value)
|
||||
"
|
||||
|
||||
@@ -240,7 +240,7 @@ test('should not rewrite scope variable', () => {
|
||||
test('object destructure', () => {
|
||||
const { code, rootRefs } = transform(`
|
||||
let n = $ref(1), { a, b: c, d = 1, e: f = 2, [g]: h } = $(useFoo())
|
||||
let { foo } = $(useSomthing(() => 1));
|
||||
let { foo } = $(useSomething(() => 1));
|
||||
console.log(n, a, c, d, f, h, foo)
|
||||
`)
|
||||
expect(code).toMatch(`a = _toRef(__$temp_1, 'a')`)
|
||||
|
||||
Reference in New Issue
Block a user