From 1b1867eefdfc712358ba9865cc15b3be2042cc4f Mon Sep 17 00:00:00 2001 From: Dimitar Nestorov Date: Thu, 18 Jan 2018 23:27:55 +0200 Subject: [PATCH] [@types/react-motion] Added didLeave. (#22875) Added didLeave to TransitionMotion props. --- types/react-motion/index.d.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/types/react-motion/index.d.ts b/types/react-motion/index.d.ts index a60b2d57a9..c33b6c8936 100644 --- a/types/react-motion/index.d.ts +++ b/types/react-motion/index.d.ts @@ -1,6 +1,8 @@ // Type definitions for react-motion // Project: https://github.com/chenglou/react-motion -// Definitions by: Stepan Mikhaylyuk , Alexey Svetliakov +// Definitions by: Stepan Mikhaylyuk +// Alexey Svetliakov +// Dimitar Nestorov // Definitions: https://github.com/borisyankov/DefinitelyTyped // TypeScript Version: 2.3 @@ -113,15 +115,20 @@ interface TransitionProps { styles: Array | InterpolateFunction; children?: (interpolatedStyles: Array) => ReactElement; /** - * Triggers when new elements appears + * Triggers when a new element will appear * @param styleThatEntered */ willEnter?: (styleThatEntered: TransitionStyle) => PlainStyle; /** - * Triggers when new element disappears + * Triggers when an element will disappear * @param styleThatLeft */ willLeave?: (styleThatLeft: TransitionStyle) => Style | void; + /** + * Triggers when an element has disappeared + * @param styleThatLeft + */ + didLeave?: (styleThatLeft: TransitionStyle) => void; } export class TransitionMotion extends Component { }