nilsmehlhorn / ngrx-wieder

Lightweight undo-redo for Angular with NgRx & immer.js
https://nils-mehlhorn.de/posts/angular-undo-redo-ngrx-redux
MIT License
127 stars 10 forks source link

Error with ngrx 11 #33

Closed chrisch-hh closed 3 years ago

chrisch-hh commented 3 years ago

Following the documentation to setup ngrx-wieder, I'm getting this errors:

Error: node_modules/ngrx-wieder/lib/produce-on.d.ts:2:10 - error TS2724: '"../../@ngrx/store/ngrx-store"' has no exported member named 'On'. Did you mean 'on'?

2 import { On } from '@ngrx/store'; ~~

Error: node_modules/ngrx-wieder/lib/undo-redo.reducer.d.ts:1:33 - error TS2724: '"../../@ngrx/store/ngrx-store"' has no exported member named 'On'. Did you mean 'on'?

1 import { Action, ActionReducer, On } from "@ngrx/store";

Seems that the name of ngrx's On has changed to lower-case on...

I'm using:

"@ngrx/store": "^11.0.1",
"immer": "^9.0.1",
"ngrx-wieder": "^5.0.0",
"rxjs": "~6.6.6",
nilsmehlhorn commented 3 years ago

Generally, On referred to the type produced by invoking the function on. Looking at the NgRx 11 source, it seems that the type name changed to OnReducer: https://github.com/ngrx/platform/blob/9c078acbbae1e72e2ec2c72d33b01a8291e075e0/modules/store/src/reducer_creator.ts#L23

Will be fixed by #28