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

Subject<void> and next() optional value #1728

Closed
artaommahe opened this issue May 24, 2016 · 2 comments · Fixed by #1780
Closed

Subject<void> and next() optional value #1728

artaommahe opened this issue May 24, 2016 · 2 comments · Fixed by #1780

Comments

@artaommahe
Copy link

Can we make Subject's next() method value optional? It's usefull for some use cases then u just need to trigger some action without any data providing to it

this.smthSubject = new Subject<void>();
...
this.smthSubject.next();

currently it will fall with error

Error TS2346: Supplied parameters do not match any signature of call target.

My current usecase is to trigger ng1(2) directive action. Directive is scrollbar wrapper and i need to trigger scrollbar update on some parent element events. I used $scope.$broadcast() for this with ng1, but currently i write ng1 code in TS with ng-metadata for further upgrading to ng2 and in search for this use case implementation without scope pubsub.

@trxcllnt
Copy link
Member

Yes, we should do this.

@lock
Copy link

lock bot commented Jun 7, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants