mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
editing begin
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user