Skip to content

Commit 909b612

Browse files
authored
Sync React Native types (facebook#19437)
1 parent 76ce685 commit 909b612

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

packages/react-native-renderer/src/ReactNativeTypes.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,35 @@ export type ReactFaricEvent = {
211211
target: number,
212212
...
213213
};
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+
|}>;

0 commit comments

Comments
 (0)