Sonsino, Ofir (os0695) | ff76b5e | 2018-07-10 15:57:37 +0300 | [diff] [blame] | 1 | import {Action, ActionCreator} from "redux"; |
| 2 | export const UPDATE_NAME= '[NAME] Update'; |
| 3 | export const UPDATE_FLAGS= '[FLAGS] Update'; |
| 4 | |
| 5 | export interface UpdateGlobalAction extends Action { |
| 6 | name?: string; |
| 7 | } |
| 8 | |
| 9 | export interface UpdateFlagsAction extends Action { |
| 10 | flags?: any; |
| 11 | } |
| 12 | |
| 13 | export const updateName: ActionCreator<UpdateGlobalAction> = |
| 14 | (name) => ({ |
| 15 | type: UPDATE_NAME, |
| 16 | name: name |
| 17 | }); |
| 18 | |
| 19 | export const updateFlags: ActionCreator<UpdateFlagsAction> = |
| 20 | (flags) => ({ |
| 21 | type: UPDATE_FLAGS, |
| 22 | flags: flags |
| 23 | }); |