Make React's SyntheticEvent.currentTarget generic over T again (#10784)

* Make SyntheticEvent.target generic over T again

This change was added in 084926e23a but then reverted in 5607f54def. The revert _looks_ like an accident to me, as it's a merge coming in from master vs. a purposeful change. Maybe it got accidentally stepped on in resolving a conflict?

If `target` should no longer be the intersection of `EventTarget` and `T`, then there's not much point to `SyntheticEvent` being generic over `T`.

* Make `currentTarget` generic over instead instead of `target`
This commit is contained in:
Josh Abernathy
2016-09-06 10:01:03 -04:00
committed by Masahiro Wakame
parent f80ef83201
commit a13fa7abf5

2
react/index.d.ts vendored
View File

@@ -272,7 +272,7 @@ declare namespace React {
interface SyntheticEvent<T> {
bubbles: boolean;
currentTarget: EventTarget;
currentTarget: EventTarget & T;
cancelable: boolean;
defaultPrevented: boolean;
eventPhase: number;