// in this file we could import other stores that use one each other while
// avoiding any recursive import
-type S = CombinedState<{
- user: typeof useUserStore
- cart: typeof useCartStore
-}>
+export function _test() {
+ type S = CombinedState<{
+ user: typeof useUserStore
+ cart: typeof useCartStore
+ }>
-let a: S
+ let a: S
-a.user.isAdmin = false
-a.cart.rawItems.push()
+ a.user.isAdmin = false
+ a.cart.rawItems.push()
+}
id: 'main',
state: () => ({ n: 0 }),
})
- const TestComponent = {
+ const TestComponent = defineComponent({
template: `<div>{{ store. n }}</div>`,
setup() {
const store = useStore()
return { store }
},
- }
+ })
const w1 = mount(TestComponent, { global: { plugins: [pinia] } })
const w2 = mount(TestComponent, { global: { plugins: [pinia] } })
expect(w1.text()).toBe('0')
"license": "MIT",
"devDependencies": {
"@microsoft/api-extractor": "7.34.4",
- "@vue/test-utils": "^2.3.2"
+ "@vue/test-utils": "^2.4.0"
},
"dependencies": {
"@vue/devtools-api": "^6.5.0",