@empathyco/x-components
Version:
Empathy X Components
18 lines (11 loc) • 1.04 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [ActionsTree](./x-components.actionstree.md)
## ActionsTree type
Type-safe actions definition type. An object with this type is what it is needed to define [Vuex](https://vuex.vuejs.org/) actions.
**Signature:**
```typescript
export type ActionsTree<State extends Dictionary, Getters extends Dictionary, Mutations extends MutationsDictionary<Mutations>, Actions extends ActionsDictionary<Actions>> = {
[Key in keyof Actions]: (context: XActionContext<State, Getters, Mutations, Actions>, payload: ExtractPayload<Actions[Key]>) => ReturnType<Actions[Key]> | Promise<ReturnType<Actions[Key]>>;
};
```
**References:** [MutationsDictionary](./x-components.mutationsdictionary.md)<!-- -->, [ActionsDictionary](./x-components.actionsdictionary.md)<!-- -->, [XActionContext](./x-components.xactioncontext.md)<!-- -->, [ExtractPayload](./x-components.extractpayload.md)