@empathyco/x-components
Version:
Empathy X Components
24 lines (14 loc) • 711 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [ActionsDictionary](./x-components.actionsdictionary.md)
## ActionsDictionary type
Util type for being used on generic constraints which will only accept an object containing actions.
**Signature:**
```typescript
export type ActionsDictionary<Actions> = Record<keyof Actions, (payload?: any) => any>;
```
## Example
Example constraint
```typescript
// This function allows receiving any object who only contains actions;
function sampleFunction\<Actions extends ActionsDictionary\<Actions\>\>(actions: Actions): void;
```