fix(store): replace Creator with ActionCreator on createAction#2299
Conversation
createAction returns incorrect type as neither Creator not it's return type contains `type`. Proper return type is ActionCreator with inner typed creator Closes meeroslav/ng-helpers#2
|
Preview docs changes for e846375 at https://previews.ngrx.io/pr2299-e846375/ |
|
Thanks, @alex-okrushko, for quick feedback. I should have provided a bit more information to clarify the reasoning. PR solves two complementary type issues.
|
|
@alex-okrushko, I've seen now that your PR #2301 solves the second issue so I will revert |
|
@meeroslav Yes, thanks. There was a separate issue that got me to rework that part. I think "createAction should return ActionCreator" is the only part that should be adjusted. Thanks for creating this issue and PR. |
|
@alex-okrushko, are the latest changes (reverts) then ok, or should I do something additional in this PR? |
|
I think this is good! |
createActionreturns incorrect type as neitherCreatornot it's return type containstype.The proper return type is
ActionCreatorwith the inner typed creatorCloses meeroslav/ng-helpers#2
Could contribute to #2192 as well.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Using type
ActionCreatoras the input parameter is causing type errors due to theCreatortype being insufficient. ActionCreator is a function that hastypedefined and returns typed Action.Creatordoes not return typed Action.Closes meeroslav/ng-helpers#2
What is the new behavior?
ActionCreatornow returnsTypedCreatorthat extends CreatorFunctionality by returningTypedActionDoes this PR introduce a breaking change?
Other information