Describe the bug
I trying to make an middleware, that check if user is logged, so I need to access state in store of vuex. But de context parameter of middleware has state like any type.
const isLogged: Middleware = ({ store }: Context) => {
store.state // this has any
}
To Reproduce
Steps to reproduce the behavior:
Make a empty nuxt typscript project version 2.15.8
Create a store with anything state
Create a middleware
Try to access state from store at context parameter with intelisense help
Expected behavior
When we use context the store must have types
Additional context
I tried to explicit declare store with follow code:
Subsequent property declarations must have the same type. Property 'store' must be of type 'Store', but here has type 'Store'.ts(2717)
index.d.ts(49, 3): 'store' was also declared here.
(property) Context.store: Store
Describe the bug I trying to make an middleware, that check if user is logged, so I need to access state in store of vuex. But de context parameter of middleware has state like any type.
To Reproduce Steps to reproduce the behavior:
Expected behavior When we use context the store must have types
Additional context I tried to explicit declare store with follow code:
But it's emits a error:
Package JSON