vue3-yuanma/packages/compiler-sfc/__tests__/__snapshots__/compileScriptRefSugar.spec.ts.snap

44 lines
743 B
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<script setup> ref sugar $ unwrapping 1`] = `
"import { ref, shallowRef } from 'vue'
export default {
setup(__props, { expose }) {
expose()
let foo = (ref())
let a = (ref(1))
let b = (shallowRef({
count: 0
}))
let c = () => {}
let d
return { foo, a, b, c, d, ref, shallowRef }
}
}"
`;
exports[`<script setup> ref sugar $ref & $shallowRef declarations 1`] = `
"import { ref as _ref, shallowRef as _shallowRef } from 'vue'
export default {
setup(__props, { expose }) {
expose()
let foo = _ref()
let a = _ref(1)
let b = _shallowRef({
count: 0
})
let c = () => {}
let d
return { foo, a, b, c, d }
}
}"
`;