Page MenuHomePhabricator

D7789.diff
No OneTemporary

D7789.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
@@ -34,9 +34,9 @@
+originY?: number,
+[key: string]: any,
|};
-
+
declare class NodeImpl { }
-
+
declare class ValueImpl extends NodeImpl {
constructor(val: number): this;
setValue(num: number): void;
@@ -101,6 +101,15 @@
declare export type Debug = (string, NodeParam) => NodeImpl;
+ declare type AnimationCallback = (
+ finished?: boolean,
+ current?: AnimatableValue
+ ) => mixed;
+
+ declare type Animatable = number | string | Array<number>;
+ declare type AnimatableValueObject = { +[key: string]: Animatable };
+ declare export type AnimatableValue = Animatable | AnimatableValueObject;
+
declare type ExtrapolateType = { ... };
declare type ExtrapolateModule = {
+CLAMP: ExtrapolateType,
@@ -133,6 +142,19 @@
extrapolate?: ?ExtrapolateType,
) => number;
+ declare export type InterpolateColorConfig = $Shape<{
+ +gamma: number,
+ +useCorrectedHSVInterpolation: boolean,
+ }>;
+
+ declare export type InterpolateColor = <T: string | number> (
+ input: number,
+ inputRange: $ReadOnlyArray<number>,
+ outputRange: $ReadOnlyArray<T>,
+ colorSpace?: 'RGB' | 'HSV',
+ interpolateColorConfig?: InterpolateColorConfig,
+ ) => T;
+
declare type EasingType = { ... };
declare type EasingModule = {
+ease: EasingType,
@@ -144,6 +166,7 @@
};
declare export var EasingNode: EasingModule;
declare type EasingFn = (t: number) => number;
+ declare type EasingFnFactory = { +factory: () => EasingFn };
declare export type TimingState = {
+finished: ValueImpl,
@@ -393,6 +416,18 @@
build(): AnimationConfigFunction<ExitAnimationsValues>;
}
+ declare export class FadeInDown extends ComplexAnimationBuilder {
+ static createInstance(): FadeInDown;
+
+ build(): AnimationConfigFunction<EntryAnimationsValues>;
+ }
+
+ declare export class FadeOutDown extends ComplexAnimationBuilder {
+ static createInstance(): FadeOutDown;
+
+ build(): AnimationConfigFunction<ExitAnimationsValues>;
+ }
+
declare type $SyntheticEvent<T: { ... }> = {
+nativeEvent: $ReadOnly<$Exact<T>>,
...
@@ -480,6 +515,17 @@
springConfig?: WithSpringConfig,
) => number;
+ declare type WithTimingConfig = $Shape<{
+ +duration: number,
+ +easing: EasingFn | EasingFnFactory,
+ }>;
+
+ declare type WithTiming = <T: AnimatableValue>(
+ toValue: T,
+ timingConfig?: WithTimingConfig,
+ callback?: AnimationCallback,
+ ) => T;
+
declare type RunOnJS = <F>(func: F) => F;
declare type CancelAnimation = (animation: number) => void;
@@ -522,6 +568,7 @@
declare export var interpolateNode: InterpolateNode;
declare export var interpolateColors: InterpolateColors;
declare export var interpolate: Interpolate;
+ declare export var interpolateColor: InterpolateColor;
declare export var Extrapolate: ExtrapolateModule;
declare export var timing: Timing;
declare export var SpringUtils: SpringUtilsModule;
@@ -534,6 +581,7 @@
declare export var useDerivedValue: UseDerivedValue;
declare export var useAnimatedStyle: UseAnimatedStyle;
declare export var withSpring: WithSpring;
+ declare export var withTiming: WithTiming;
declare export var runOnJS: RunOnJS;
declare export var cancelAnimation: CancelAnimation;
@@ -576,6 +624,7 @@
+interpolateNode: InterpolateNode,
+interpolateColors: InterpolateColors,
+interpolate: Interpolate,
+ +interpolateColor: InterpolateColor,
+Extrapolate: ExtrapolateModule,
+timing: Timing,
+spring: Spring,
@@ -588,6 +637,7 @@
+useDerivedValue: UseDerivedValue,
+useAnimatedStyle: UseAnimatedStyle,
+withSpring: WithSpring,
+ +withTiming: WithTiming,
+runOnJS: RunOnJS,
+cancelAnimation: CancelAnimation,
...

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 3, 1:53 PM (1 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2611903
Default Alt Text
D7789.diff (3 KB)

Event Timeline