-
-
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
Store: is metaReducers signature correct? #264
Comments
brandonroberts
added a commit
that referenced
this issue
Aug 15, 2017
ItamarGronich
pushed a commit
to hasadna/open_pension
that referenced
this issue
Aug 24, 2017
- Versions 4.0.0 - 4.0.3 have a bug related to setting up metaReducers (ngrx/platform#264). - We should include a package-lock.json top prevent those kinds of things - package-lock.json will make sure we all have the same versions of everything.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm submitting a...
What is the current behavior?
In
StoreModule.forRoot()
, in itsStoreConfig<T,V>
parameter, itsmetaReducers
property is typed as an (optional) array ofActionReducer<T,V>
.But then in meta reducers docs provided example (which is correct, I think), does not adhere to that type:
which is like (adding fictional generic types):
Infact, being a meta-reducer,
debug
is not a reducer itself: is a function taking a reducer and giving another (transformed, wrapped, decorated ...) reducer.So it seems to me that
metaReducers
cannot be an array ofActionReducer<T,V>
. As a matter of fact, when I add (non generic) types to mydebug
function, code does not compile because ofmetareducers
issue with types:Expected behavior:
metaReducers
property should be typed as an (optional) array of reducer-transformers, each item like:(red: ActionReducer<T,V>) => ActionReducer<T,V>
Minimal reproduction of the problem with instructions:
Version of affected browser(s),operating system(s), npm, node and ngrx:
Other information:
The text was updated successfully, but these errors were encountered: