Answer the question
In order to leave comments, you need to log in
How to typescript volume action inputs in vuex 4 (vue 3)?
parameters such as commit, getters, rootGetters, etc.
Here is an example, now everyone has type any, but any is not recommended to use yet
*****
actions: {
async updateData({ commit, getters, rootGetters }: any, toUpdate: string) {
*******
}
}
*****
Answer the question
In order to leave comments, you need to log in
type UpdateDataActions = {
commit: string;
getters: (() => void)[];
rootGetters: (() => void)[];
}
... async updateData({commit,getters,rootGetters}:UpdateDataActions, toUpdate: string) {...}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question