-import { computed, ref } from 'vue'
+import { computed, ref, shallowRef } from 'vue'
import { defineStore, expectType } from './'
const name = ref('Eduardo')
name,
double,
counter,
+ aRef: ref(0),
+ aShallowRef: shallowRef({ msg: 'hi' }),
}),
getters: {
expectType<number>(this.counter)
return undefined
},
+
+ fromARef: (state) => state.aRef,
},
actions: {
expectType<number>(store.$state.counter)
expectType<number>(store.$state.double)
+
+expectType<number>(store.aRef)
+expectType<number>(store.$state.aRef)
+expectType<number>(store.fromARef)
+
+expectType<{ msg: string }>(store.aShallowRef)
+expectType<{ msg: string }>(store.$state.aShallowRef)