HerringtonDarkholme / kilimanjaro

typed vuex 2.0
62 stars 4 forks source link

add experimental API for vuex like #2

Closed HerringtonDarkholme closed 8 years ago

HerringtonDarkholme commented 8 years ago
craete({order: 1})
  .mutation('pay_check0', state => state.order += 1)
  .mutation('pay_check', (state, n?: number) => state.order += 1)
  .mutation('pay_check1', (state, n: number) => state.order += n)
  .mutation('pay_check2', (state, n: number = 2) => state.order += n)
HerringtonDarkholme commented 8 years ago

Impossible. Until TypeScript supports variance