diff --git a/modules/store/src/action_creator.ts b/modules/store/src/action_creator.ts index 1d1534755f..74a916a67b 100644 --- a/modules/store/src/action_creator.ts +++ b/modules/store/src/action_creator.ts @@ -11,13 +11,13 @@ export function createAction< P extends { [key: string]: any; } ->(type: T, payload: P): Action; +>(type: T, props: P): Action; export function createAction< T extends string, P extends { [key: string]: any; } ->(type: T, payload?: P) { +>(type: T, props?: P) { /* The following line requires Typescript 3.2: Generic spread expressions in object literals. @@ -28,7 +28,7 @@ export function createAction< */ // const action = payload === undefined ?{ type } : { type, ...payload }; const action = - payload === undefined ? { type } : { type, ...(payload as object) }; + props === undefined ? { type } : { type, ...(props as object) }; return action; }