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

fix: ThreeEvent should not include initMouseEvent #3372

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

bbohlender
Copy link
Contributor

Currently, the types for all onClick, ... events expose the initMouseEvent function. The Properties type definition has the goal to remove all functions, but it only removes functions with one parameter. Therefore the initMouseEvent is not removed and the type is forwarded to the event, even though no initMouseEvent function exists on the actual event object.

This PR fixes that and uses a more modern way of filtering entries in the map using as supported from typescript 4.1 (4 years ago). https://www.typescriptlang.org/docs/handbook/2/mapped-types.html#key-remapping-via-as

Copy link

codesandbox-ci bot commented Oct 5, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c678771:

Sandbox Source
example Configuration

@CodyJasonBennett
Copy link
Member

Nice find.

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.

2 participants