Skip to content

Commit 4a0d959

Browse files
bichikimktsn
authored andcommitted
docs(en): update for updated map helper Api (#1215)
* update for map helper Updated Api https://github.com/vuejs/vuex/blob/06eb3df66f8690cf59ed57f6cbd16e88695d6837/src/helpers.js#L50 https://github.com/vuejs/vuex/blob/06eb3df66f8690cf59ed57f6cbd16e88695d6837/src/helpers.js#L21 * Update api.md * Update api.md * Update Second object string & function description object <string, string -> object < string object <function(... -> object < function> add function description
1 parent 6e965c9 commit 4a0d959

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

docs/en/api.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,29 +196,35 @@ const store = new Vuex.Store({ ...options })
196196
197197
### Component Binding Helpers
198198
199-
- **`mapState(namespace?: string, map: Array<string> | Object): Object`**
199+
- **`mapState(namespace?: string, map: Array<string> | Object<string | function>): Object`**
200200

201201
Create component computed options that return the sub tree of the Vuex store. [Details](state.md#the-mapstate-helper)
202202

203203
The first argument can optionally be a namespace string. [Details](modules.md#binding-helpers-with-namespace)
204+
205+
The Second object argument's members can be a function. `function(state: any)`
204206

205-
- **`mapGetters(namespace?: string, map: Array<string> | Object): Object`**
207+
- **`mapGetters(namespace?: string, map: Array<string> | Object<string>): Object`**
206208

207209
Create component computed options that return the evaluated value of a getter. [Details](getters.md#the-mapgetters-helper)
208210

209211
The first argument can optionally be a namespace string. [Details](modules.md#binding-helpers-with-namespace)
210212

211-
- **`mapActions(namespace?: string, map: Array<string> | Object): Object`**
213+
- **`mapActions(namespace?: string, map: Array<string> | Object<string | function>): Object`**
212214

213215
Create component methods options that dispatch an action. [Details](actions.md#dispatching-actions-in-components)
214216

215217
The first argument can optionally be a namespace string. [Details](modules.md#binding-helpers-with-namespace)
218+
219+
The Second object argument's members can be a function. `function(dispatch: function, ...args: any[])`
216220

217-
- **`mapMutations(namespace?: string, map: Array<string> | Object): Object`**
221+
- **`mapMutations(namespace?: string, map: Array<string> | Object<string | function>): Object`**
218222

219223
Create component methods options that commit a mutation. [Details](mutations.md#committing-mutations-in-components)
220224

221225
The first argument can optionally be a namespace string. [Details](modules.md#binding-helpers-with-namespace)
226+
227+
The Second object argument's members can be a function. `function(commit: function, ...args: any[])`
222228

223229
- **`createNamespacedHelpers(namespace: string): Object`**
224230

0 commit comments

Comments
 (0)