vuex-typescript-fsa
vuex-typescript-fsa
The helper function for inferring a combination of action/mutation and handler
This project is under development. Some features have bugs and some APIs might be changed near future.
Installation
npm install vuex-typescript-fsa
Demo

Usage
const Increment = actionCreator<number>("Increment");
const store = new Store<{ count: number }>({
state: {
count: 0
},
actions: combineAction(
action(Increment, function(context, action) {
context.commit(action);
})
),
mutations: combineMutation(
mutation(Increment, function(state, action) {
state.count = action.payload;
})
)
});
store.dispatch(Increment(10));
License
MIT
Related Packages
direct-vuex
Use and implement your Vuex store with TypeScript types. Compatible with the Vue...
90,286
255
undo-redo-vuex
A Vuex plugin for module namespaced undo and redo functionality. This plugin tak...
9,207
47
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.4.1 | 2.6.11 | MIT | |
| 0.4.0 | 2.5.21 | MIT | |
| 0.3.0 | ^2.5.21 | MIT | |
| 0.2.0 | ^2.5.21 | MIT | |
| 0.1.1 | ^2.5.21 | MIT | |
| 0.1.0 | ^2.5.21 | MIT |