-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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! |
createAction
returns incorrect type as neitherCreator
not it's return type containstype
.The proper return type is
ActionCreator
with 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
ActionCreator
as the input parameter is causing type errors due to theCreator
type being insufficient. ActionCreator is a function that hastype
defined and returns typed Action.Creator
does not return typed Action.Closes meeroslav/ng-helpers#2
What is the new behavior?
ActionCreator
now returnsTypedCreator
that extends CreatorFunctionality by returningTypedAction
Does this PR introduce a breaking change?
Other information