ngxs-labs / emitter

:octopus: New pattern that provides the opportunity to feel free from actions
MIT License
110 stars 5 forks source link

error TS2345: Argument of type (boolean,number etc) is not assignable to parameter of type 'void' #460

Open dsubiros opened 4 years ago

dsubiros commented 4 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => https://github.com/ngxs/store/blob/master/CONTRIBUTING.md
[ ] Other... Please describe:

Current behavior

Same code worked OK until @ngxs-labs/emitter v1.9.0, as soon as updated to @ngxs-labs/emitter v2.0.0 it began throwing issues like the following (These cases contain errors with boolean data types, but same happens with any data type and the error output would contain the used data type like number, string, custom types etc):

app/modules/dashboards/modules/operator/app-skeleton-operator/app-skeleton-operator.component.ts:327:61 - error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'void'.

327 this.emitter.action(AppState.setLeftSidenavOpen).emit(opened);

app/modules/dashboards/modules/operator/app-skeleton-operator/app-skeleton-operator.component.ts:331:78 - error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'void'.

331           tap(value => this.emitter.action(AppState.setLeftSidenavOpen).emit(!value)))

app/modules/dashboards/modules/operator/app-skeleton-operator/app-skeleton-operator.component.ts:338:77 - error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'void'.

338 tap(value => this.emitter.action(AppState.setSidenavRightOpen).emit(!value)))

Expected behavior

To have it working without issues

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


Libs:
- @angular/core version: 8.2.14
- @ngxs/store version: 3.6.1


Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:
- Node version: 10.15.3  
- Platform:  Linux 

Others:

NOTE: I must confess I upgraded both @ngxs/store and other plugins to v3.6.1 and @ngxs-labs/emitter to v2.0.0 at the same time, so I'm not really sure whether the issue happens with @ngxs/store or @ngxs-labs/emitter packages. I'm using NGXS in a production already (still under development also) app, that's why I took so long to upgrade.

dsubiros commented 4 years ago

Hello. isn't this packaged maintained anymore? If so, it's a completely shame. I have a production deployed and still-under development app, which is 99% of store call based on this package.

Please keep it up, do not drop support for this awesome package!

splincode commented 4 years ago

@dsubiros Unfortunately, this is a laboratory project, but you can take part in its support and send PRs yourself.

At the moment, for half a year I am developing a new plug-in with a new simplified approach: https://github.com/ngxs-labs/data

dsubiros commented 4 years ago

Thanks @splincode When I started this project and saw Emitter, I fell in love with it instantly. Now I'm wondering what to do after 99% of the project is relaying in NGXS Emitter.

splincode commented 4 years ago

I had the same thing in the project, and I just rewrote all the projects