Skip to content

Instantly share code, notes, and snippets.

@przemyslawjanpietrzak
Last active October 31, 2021 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save przemyslawjanpietrzak/52e7602697b2ed93bda903a6de735e32 to your computer and use it in GitHub Desktop.
Save przemyslawjanpietrzak/52e7602697b2ed93bda903a6de735e32 to your computer and use it in GitHub Desktop.
literal-types-vuex.ts
actionA1({ commit, dispatch }, payload) {
commit('mutationA1', false); // ERROR: Argument of type 'boolean' is not assignable to parameter of type 'MutationA2Payload'.
dispatch('actionA2', false); // ERROR: Argument of type 'boolean' is not assignable to parameter of type 'ActionA2Payload'.
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment