react: Add animation and transition events from React 15. (#9443)

This commit is contained in:
Rand Scullard
2016-06-02 23:03:09 +09:00
committed by Masahiro Wakame
parent a0d42d9336
commit e76f4c9798
+22
View File
@@ -354,6 +354,18 @@ declare namespace __React {
deltaZ: number;
}
interface AnimationEvent extends SyntheticEvent {
animationName: string;
pseudoElement: string;
elapsedTime: number;
}
interface TransitionEvent extends SyntheticEvent {
propertyName: string;
pseudoElement: string;
elapsedTime: number;
}
//
// Event Handler Types
// ----------------------------------------------------------------------
@@ -374,6 +386,8 @@ declare namespace __React {
type TouchEventHandler = EventHandler<TouchEvent>;
type UIEventHandler = EventHandler<UIEvent>;
type WheelEventHandler = EventHandler<WheelEvent>;
type AnimationEventHandler = EventHandler<AnimationEvent>;
type TransitionEventHandler = EventHandler<TransitionEvent>;
//
// Props / DOM Attributes
@@ -497,6 +511,14 @@ declare namespace __React {
// Wheel Events
onWheel?: WheelEventHandler;
// Animation Events
onAnimationStart?: AnimationEventHandler;
onAnimationEnd?: AnimationEventHandler;
onAnimationIteration?: AnimationEventHandler;
// Transition Events
onTransitionEnd?: TransitionEventHandler;
}
// This interface is not complete. Only properties accepting