@empathyco/x-components
Version:
Empathy X Components
14 lines (8 loc) • 520 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [ExtractActionReturn](./x-components.extractactionreturn.md)
## ExtractActionReturn type
Flattens the (probably) chained promises of an action type.
**Signature:**
```typescript
export type ExtractActionReturn<Action extends (payload?: any) => any> = ReturnType<Action> extends Promise<any> ? ReturnType<Action> : Promise<ReturnType<Action>>;
```