diff --git a/Libraries/Animated/Animated.d.ts b/Libraries/Animated/Animated.d.ts index 215f773cac2411..6054244af9d5f4 100644 --- a/Libraries/Animated/Animated.d.ts +++ b/Libraries/Animated/Animated.d.ts @@ -168,6 +168,13 @@ export namespace Animated { */ stopAnimation(callback?: (value: number) => void): void; + /** + * Stops any animation and resets the value to its original. + * + * See https://reactnative.dev/docs/animatedvalue#resetanimation + */ + resetAnimation(callback?: (value: number) => void): void; + /** * Interpolates the value before updating the property, e.g. mapping 0-1 to * 0-10. @@ -175,6 +182,14 @@ export namespace Animated { interpolate( config: InterpolationConfigType, ): AnimatedInterpolation; + + /** + * Typically only used internally, but could be used by a custom Animation + * class. + * + * See https://reactnative.dev/docs/animatedvalue#animate + */ + animate(animation: Animation, callback?: EndCallback | null): void; } type ValueXYListenerCallback = (value: {x: number; y: number}) => void; @@ -201,6 +216,8 @@ export namespace Animated { extractOffset(): void; + resetAnimation(callback?: (value: {x: number; y: number}) => void): void; + stopAnimation(callback?: (value: {x: number; y: number}) => void): void; addListener(callback: ValueXYListenerCallback): string;