0

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.

2
  • I think you use it as normal but.. with types... So you just import your types from somewhere. Commented Nov 30, 2017 at 15:44
  • Indeed, I plan to make use a grpc backend -that was my motivation for adopting a 'typed' approach. So, yes, i just guessed i should use types for some grpc call. Commented Nov 30, 2017 at 15:46

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.