ngx-store: Property 'composedPath' is missing in type 'NgxStorageEvent'. on Angular 7
I get this error when using Angular 7:
ERROR in node_modules/ngx-store/src/utility/storage/storage-event.d.ts(1,22): error TS2420: Class 'NgxStorageEvent' incorrectly implements interface
'StorageEvent'.
Property 'composedPath' is missing in type 'NgxStorageEvent'.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 6
- Comments: 18 (8 by maintainers)
Commits related to this issue
- Added method composedPath() Added method composedPath because Event interface changed in Angular 7. Fixes bug #66 . — committed to beleta/ngx-store by beleta 6 years ago
- Added method composedPath() Added method composedPath because Event interface changed in Angular 7. Fixes bug #66 . — committed to timn/ngx-store by beleta 6 years ago
I’ve upgraded the project to Angular 7 in my own fork. This includes the change from @beleta, as well as some other changes to fix the build (e.g no longer relevant properties of NgxStorageEvent). You can use the following as a dependency if you wish to use this:
Relevant changes are on the angular_7 branch. The
angular_7_buildbranch, just publishes the dist directory Github so it can be downloaded by NPM (or Yarn).One thing to note, I had to lock “@types/node” to
10.11.6, to prevent a different issue with ts-debug, also owned by our friend @DanielKucal. Hopefully he pops up soon enough.For now, I’ll leave the fork up until he get’s back, or feel free to fork mine and use your own Github namespace (
"ngx-build": "<your-username>/ngx-store#angular_7_build").Just wanted to report the same issue. can confirm it and that the solution works for me
Yeah in your
package.jsonfile just replace:with:
or fork my ngx-store repo to your own repo, and reference your fork instead:
You shouldn’t need to change anything else, it’s basically just upgrading the dependency.
Thanks! Doesn’t show up in Github, yet. Forgot to push the tag?
A new version has been released, mainly thanks to @timn.
npm i ngx-store@latest --saveshould fix your problems. Please let me know if it does not.Done.