Guest User

Untitled

a guest
May 24th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. export function createAction<T>(type: string): PayloadAction<T> {
  2. return { type };
  3. }
  4.  
  5. export function createActionFunction<T>(action: PayloadAction<T>): ActionFunction<T> {
  6. return (payload: T) => ({ type: action.type, payload});
  7. }
Add Comment
Please, Sign In to add comment