Page MenuHomePhabricator

D13070.id43365.diff
No OneTemporary

D13070.id43365.diff

diff --git a/native/flow-typed/npm/react-native-reanimated_v2.x.x.js b/native/flow-typed/npm/react-native-reanimated_v2.x.x.js
--- a/native/flow-typed/npm/react-native-reanimated_v2.x.x.js
+++ b/native/flow-typed/npm/react-native-reanimated_v2.x.x.js
@@ -47,33 +47,33 @@
declare class ViewImpl extends React$Component<{
+entering?:
| ReanimatedAnimationBuilder
- | EntryExitAnimationFunction
+ | EntryAnimationFunction
| Keyframe,
+exiting?:
| ReanimatedAnimationBuilder
- | EntryExitAnimationFunction
+ | ExitAnimationFunction
| Keyframe,
...
}> { }
declare class TextImpl extends React$Component<{
+entering?:
| ReanimatedAnimationBuilder
- | EntryExitAnimationFunction
+ | EntryAnimationFunction
| Keyframe,
+exiting?:
| ReanimatedAnimationBuilder
- | EntryExitAnimationFunction
+ | ExitAnimationFunction
| Keyframe,
...
}> { }
declare class ImageImpl extends React$Component<{
+entering?:
| ReanimatedAnimationBuilder
- | EntryExitAnimationFunction
+ | EntryAnimationFunction
| Keyframe,
+exiting?:
| ReanimatedAnimationBuilder
- | EntryExitAnimationFunction
+ | ExitAnimationFunction
| Keyframe,
...
}> { }
@@ -306,7 +306,7 @@
declare type AnimationFunction = (a?: any, b?: any, c?: any) => any;
- declare type EntryAnimationsValues = {|
+ declare export type EntryAnimationsValues = {|
+targetOriginX: number,
+targetOriginY: number,
+targetWidth: number,
@@ -315,7 +315,7 @@
+targetGlobalOriginY: number,
|};
- declare type ExitAnimationsValues = {|
+ declare export type ExitAnimationsValues = {|
+currentOriginX: number,
+currentOriginY: number,
+currentWidth: number,
@@ -324,8 +324,13 @@
+currentGlobalOriginY: number,
|};
- declare export type EntryExitAnimationFunction = (
- targetValues: EntryAnimationsValues | ExitAnimationsValues,
+
+ declare export type EntryAnimationFunction = (
+ targetValues: EntryAnimationsValues,
+ ) => LayoutAnimation;
+
+ declare export type ExitAnimationFunction = (
+ targetValues: ExitAnimationsValues,
) => LayoutAnimation;
declare type AnimationConfigFunction<T> = (
@@ -396,7 +401,7 @@
getDelay(): number;
getDelayFunction(): AnimationFunction;
- static build(): EntryExitAnimationFunction | LayoutAnimationFunction;
+ static build(): EntryAnimationFunction | ExitAnimationFunction | LayoutAnimationFunction;
}
declare export type ReanimatedAnimationBuilder =
diff --git a/native/types/styles.js b/native/types/styles.js
--- a/native/types/styles.js
+++ b/native/types/styles.js
@@ -4,7 +4,8 @@
import { View, Text, Image } from 'react-native';
import Animated, {
type ReanimatedAnimationBuilder,
- type EntryExitAnimationFunction,
+ type EntryAnimationFunction,
+ type ExitAnimationFunction,
type SharedValue,
} from 'react-native-reanimated';
@@ -50,11 +51,8 @@
const AnimatedView: React.ComponentType<{
...$Diff<ViewProps, { style: ViewStyle }>,
+style: AnimatedViewStyle,
- +entering?:
- | ReanimatedAnimationBuilder
- | EntryExitAnimationFunction
- | Keyframe,
- +exiting?: ReanimatedAnimationBuilder | EntryExitAnimationFunction | Keyframe,
+ +entering?: ReanimatedAnimationBuilder | EntryAnimationFunction | Keyframe,
+ +exiting?: ReanimatedAnimationBuilder | ExitAnimationFunction | Keyframe,
}> = Animated.View;
export type AnimatedTextStyle =

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 5:52 AM (18 h, 36 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2684140
Default Alt Text
D13070.id43365.diff (3 KB)

Event Timeline