DEV Community

Discussion on: Vuex + TypeScript

Collapse
 
jay_2ae6ad576a843f profile image
Yunjie Jia

actually, I have a question, according to this line

payload: Parameters[1]

it forces me to commit a mutation with payload, but what if I just want to commit a mutation without a payload?

like the RESET_COUNTER action in your article

Collapse
 
he110te4m profile image
牡龙

I have same problem. Did you have the solution?

Collapse
 
izerozlu profile image
izerozlu

You can mark the payload parameter as optional.