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

Expose EventDispatcher's _listeners as protected #1374

Open
HoloTheDrunk opened this issue Nov 12, 2024 · 0 comments · May be fixed by #1375
Open

Expose EventDispatcher's _listeners as protected #1374

HoloTheDrunk opened this issue Nov 12, 2024 · 0 comments · May be fixed by #1375

Comments

@HoloTheDrunk
Copy link

This would allow users to seamlessly extend the behaviour of EventDispatcher when deriving from it.
As it stands, extending EventDispatcher does not allow the user to access the _listeners field without TypeScript errors, making code implementing utility functions worse. One common example would be clearing the listeners, which is not possible with the default EventDispatcher but is sometimes necessary.

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

Successfully merging a pull request may close this issue.

1 participant