Reputation: 6729
I am trying to use Typescript with a Vue project in which I use vuex for the data state management. In the Vuex site it says:
Note: for TypeScript users, [email protected]+ requires [email protected]+, and vice versa.
However, there is no usage hint or specification around the site.
So, assuming we already have [email protected]+ and [email protected]+, what is the thing to be done for Typescript implementation in the store member(s)? Should we have a separate file for types (i.e. types.ts
) and store the data types as Typescript interfaces/classes there etc.?
P.S: The seamless usage of Typescript also with Vuex's namespaced property would be perfectly nice.
Upvotes: 0
Views: 740
Reputation: 6729
The pull request by the vuex contributor ktsn points to the issue of integrating a close-to-full type safety in vuex. Its merge to the master branch should solve it:
https://github.com/vuejs/vuex/pull/1121
Upvotes: 1