Sync React Native types (#19437)
Ricky committed
Jul 22, 2020 at 22:56 UTC
909b612e27d1a59aa601e2b8461a44661faaffa8
1 file changed
+32
packages/react-native-renderer/src/ReactNativeTypes.js
+32
@@ -211,3 +211,35 @@ export type ReactFaricEvent = {
211
target: number,
212
...
213
};
214
+
215
+// Imperative LayoutAnimation API types
216
+//
217
+export type LayoutAnimationType =
218
+ | 'spring'
219
+ | 'linear'
220
+ | 'easeInEaseOut'
221
+ | 'easeIn'
222
+ | 'easeOut'
223
+ | 'keyboard';
224
+
225
+export type LayoutAnimationProperty =
226
+ | 'opacity'
227
+ | 'scaleX'
228
+ | 'scaleY'
229
+ | 'scaleXY';
230
+
231
+export type LayoutAnimationAnimationConfig = $ReadOnly<{|
232
+ duration?: number,
233
+ delay?: number,
234
+ springDamping?: number,
235
+ initialVelocity?: number,
236
+ type?: LayoutAnimationType,
237
+ property?: LayoutAnimationProperty,
238
+|}>;
239
+
240
+export type LayoutAnimationConfig = $ReadOnly<{|
241
+ duration: number,
242
+ create?: LayoutAnimationAnimationConfig,
243
+ update?: LayoutAnimationAnimationConfig,
244
+ delete?: LayoutAnimationAnimationConfig,
245
+|}>;