-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Closed
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsenhancementNew feature or requestNew feature or requesttypesRelated to typings onlyRelated to typings only
Description
Right now it's hard to maintain type safety with Vuex
and Typescript
because of the way the $store
exposes actions and mutations through string-based dispatch
and commit
. At compile time there's no way to know the strings are valid or that the passed payload has the requisite fields.
There's this valiant effort:
- https://github.com/HerringtonDarkholme/kilimanjaro
- https://herringtondarkholme.github.io/2016/10/03/vue2-ts2/
Though that API doesn't really look like the Vuex
API to me. Would there be interest in trying to allow typescript type safety in Vuex? Are there existing best practices?
icopp, Anonyfox, alexcorvi, simon0191, AntoineEsteve and 23 more
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsenhancementNew feature or requestNew feature or requesttypesRelated to typings onlyRelated to typings only