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
Use accurate Event type #4375
base: master
Are you sure you want to change the base?
Use accurate Event type #4375
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4375 +/- ##
======================================
Coverage 100% 100%
======================================
Files 74 74
Lines 1686 1691 +5
======================================
+ Hits 1686 1691 +5
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #4375 +/- ##
======================================
Coverage 100% 100%
======================================
Files 74 74
Lines 1686 1691 +5
======================================
+ Hits 1686 1691 +5
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #4375 +/- ##
======================================
Coverage 100% 100%
======================================
Files 74 74
Lines 1686 1691 +5
======================================
+ Hits 1686 1691 +5
Continue to review full report at Codecov.
|
The existing Event type would not typecheck for any correct event-handling code; dataTransfer is not present for non-DnD events, and value is not guaranteed to be present for non-Input events. This change is quite safe: 1. Props the user is expected to pass in are replaced with supertypes of what they were before (a function taking a subtype is a supertype) 2. Props the user is given are replaced with supertypes of what they were before, but they should only get a type error in cases where they are legitimately messing up (i.e. are passing an Event that doesn't have an HTMLInputElement as its target to the handlers in FieldProps).
Codecov Report
@@ Coverage Diff @@
## master #4375 +/- ##
======================================
Coverage 100% 100%
======================================
Files 74 74
Lines 1694 1691 -3
======================================
- Hits 1694 1691 -3
Continue to review full report at Codecov.
|
The existing Event type would not typecheck for any correct
event-handling code; dataTransfer is not present for non-DnD events, and
value is not guaranteed to be present for non-Input events.
This change is quite safe:
Props the user is expected to pass in are replaced with supertypes of
what they were before (a function taking a subtype is a supertype)
Props the user is given are replaced with supertypes of what they
were before, but they should only get a type error in cases where they
are legitimately messing up (i.e. are passing an Event that doesn't have
an HTMLInputElement as its target to the handlers in FieldProps).