Skip to content
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

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

Open
dsubiros opened this issue Feb 1, 2020 · 4 comments

Comments

@dsubiros
Copy link

dsubiros commented Feb 1, 2020

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
Copy link
Author

dsubiros commented Apr 7, 2020

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
Copy link
Member

@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
Copy link
Author

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants