Skip to content

Commit

Permalink
fix: Match GetterHandler params to Vuex requirements
Browse files Browse the repository at this point in the history
Copy of PR on vuex-typescript:
istrib/vuex-typescript#22
Fixes bug that did not allow users to access RootState from typed getters
Bug on vuex-typescript:
istrib/vuex-typescript#11
  • Loading branch information
jackkoppa committed Nov 5, 2018
1 parent 79ad42f commit fc3cbad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export function Handler(target: any, key: string) {
target[key]._vuexKey = key;
}

/**
* Vuex getter handler specified in Vuex options.
/*
* Vuex getter handler with all available parameters as specified in Vuex options
*/
export type GetterHandler<TModuleState, TRootState, TResult> =
(state: TModuleState, rootState: TRootState) => TResult;
(state: TModuleState, getters: any, rootState: TRootState, rootGetters: any) => TResult;

/**
* Vuex action handler which takes payload as specified in Vuex options.
Expand Down

0 comments on commit fc3cbad

Please sign in to comment.