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

Prevent accidental use #25

Open
svallory opened this issue Jan 31, 2023 · 0 comments
Open

Prevent accidental use #25

svallory opened this issue Jan 31, 2023 · 0 comments

Comments

@svallory
Copy link
Member

listen(topic: string, handler: (msg: any) => void): void;

The fact that the method will remove other listeners should be made clear in the method's name or via a mandatory parameter (e.g. removeOtherListeners: boolean)

In the second case, if removeOtherListeners is set to false forward call to subscribe

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

1 participant