mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 19:51:53 +00:00
react: Add animation and transition events from React 15. (#9443)
This commit is contained in:
committed by
Masahiro Wakame
parent
a0d42d9336
commit
e76f4c9798
Vendored
+22
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user