placed the redux-utils goop in a different directory

This commit is contained in:
Ken
2019-01-31 13:34:19 -08:00
parent 6da255c206
commit 2ecb667b3a
4 changed files with 49 additions and 36 deletions

View File

@@ -1,12 +1,4 @@
import { Action } from 'redux';
type ActionWithPayload<T, P> = Action<T> & P;
function action<T extends string>(type: T): Action<T>;
function action<T extends string, P>(type: T, payload: P): ActionWithPayload<T, P>;
function action<T extends string, P>(type: T, payload?: P) {
return { type, ...payload };
}
import { action } from '../redux-utils/action';
export const actions = {
add: (label: string) => action('add', { label }),