(types: string[], ns: string)
| 14 | * @returns {object} Object with action types. |
| 15 | */ |
| 16 | export function createTypes(types: string[], ns: string): ActionTypes { |
| 17 | return types.reduce( |
| 18 | (types, action: string) => ({ |
| 19 | ...types, |
| 20 | [action]: `${ns}.${action}` |
| 21 | }), |
| 22 | {} |
| 23 | ); |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Creates an array with action names. |
no outgoing calls
no test coverage detected