-
Notifications
You must be signed in to change notification settings - Fork 2.5k
wrong typing for injected DataPersistence service in generated Effects class #748
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
Labels
Comments
bcabanes
added a commit
to bcabanes/nx
that referenced
this issue
Sep 18, 2018
This adds the `<%= className%>StoreState` used to type the store from the `DataPersistence` methods. close nrwl#748
bcabanes
added a commit
to bcabanes/nx
that referenced
this issue
Sep 19, 2018
This adds the `<%= className%>PartialState` used to type the store from the `DataPersistence` methods. This adds the `XXX_FEATURE_KEY` to the `xxx.reducer.ts` file too. close nrwl#748
bcabanes
added a commit
to bcabanes/nx
that referenced
this issue
Sep 19, 2018
This adds the `<%= className%>PartialState` used to type the store from the `DataPersistence` methods. This adds the `XXX_FEATURE_KEY` to the `xxx.reducer.ts` file too. close nrwl#748
bcabanes
added a commit
to bcabanes/nx
that referenced
this issue
Sep 20, 2018
This adds the `<%= className%>PartialState` used to type the store from the `DataPersistence` methods. This adds the `XXX_FEATURE_KEY` to the `xxx.reducer.ts` file too. close nrwl#748
vsavkin
pushed a commit
that referenced
this issue
Sep 28, 2018
This adds the `<%= className%>PartialState` used to type the store from the `DataPersistence` methods. This adds the `XXX_FEATURE_KEY` to the `xxx.reducer.ts` file too. close #748
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I ran
ng g ngrx dummy
and this interface is generated in the reducer file:The corresponding effects file looks like this:
The typing for the injected
dataPersistence
service as well as the typing in therun
method indicate, that only thedummy
part is passed to the run method.However, the actual implementation uses the complete state:
.pipe(withLatestFrom(this.store), fetch(opts));
https://github.com/nrwl/nx/blob/master/packages/nx/src/data-persistence.ts#L369
I have an older Nx-based project where the typing has been generated correctly. There was an additional interface in the reducer that described the part of the app state the reducer was responsible for. So this seems to be a regression.
The text was updated successfully, but these errors were encountered: