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

Viewer: Add removeEventListener typings #16155

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

ryantrem
Copy link
Member

@ryantrem ryantrem commented Feb 6, 2025

Previously I had added strong typing for addEventListener for the ViewerElement's custom events, but I forgot to do the same for removeEventListener. In this PR, I am adding removeEventListener, but I'm also moving this to be type only. Previously I did this typing by overriding the base addEventListener and calling it on super, but there is nothing actually needed at runtime for this, so we may as well remove any runtime impact (one extra frame on the callstack, a tiny bit of extra code in the final bundle).

@ryantrem ryantrem requested a review from RaananW February 6, 2025 20:54
@ryantrem ryantrem enabled auto-merge (squash) February 6, 2025 20:54
@bjsplat
Copy link
Collaborator

bjsplat commented Feb 6, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 6, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 6, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 6, 2025

@ryantrem ryantrem merged commit 9878af0 into BabylonJS:master Feb 6, 2025
14 of 15 checks passed
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 this pull request may close these issues.

3 participants