editing begin

This commit is contained in:
Ken
2019-01-31 00:03:02 -08:00
parent e3e977a98d
commit 578ad8221d
9 changed files with 164 additions and 44 deletions

View File

@@ -1,7 +1,7 @@
import { Action, ActionCreator } from 'redux';
export type ActionTypes = 'add' | 'remove' | 'edit' | 'complete' | 'completeAll' | 'clear' | 'filter';
type TodoActionCreator = ActionCreator<Action<ActionTypes>>;
export interface TodoAction extends Action<ActionTypes> {
[extraProps: string]: any;
}
@@ -12,4 +12,4 @@ export const edit = (id: string, label: string): TodoAction => ({ type: 'edit',
export const complete = (id: string): TodoAction => ({ type: 'complete', id });
export const completeAll = (): TodoAction => ({ type: 'completeAll' });
export const clear = (): TodoAction => ({ type: 'clear' });
export const filter = (filterTypes: string): TodoAction => ({ type: 'filter', filterTypes });
export const filter = (filterTypes: string): TodoAction => ({ type: 'filter', filter: filterTypes });