Skip to content

Commit

Permalink
Sync React Native types (#19437)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickhanlonii authored Jul 23, 2020
1 parent 76ce685 commit 909b612
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions packages/react-native-renderer/src/ReactNativeTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,35 @@ export type ReactFaricEvent = {
target: number,
...
};

// Imperative LayoutAnimation API types
//
export type LayoutAnimationType =
| 'spring'
| 'linear'
| 'easeInEaseOut'
| 'easeIn'
| 'easeOut'
| 'keyboard';

export type LayoutAnimationProperty =
| 'opacity'
| 'scaleX'
| 'scaleY'
| 'scaleXY';

export type LayoutAnimationAnimationConfig = $ReadOnly<{|
duration?: number,
delay?: number,
springDamping?: number,
initialVelocity?: number,
type?: LayoutAnimationType,
property?: LayoutAnimationProperty,
|}>;

export type LayoutAnimationConfig = $ReadOnly<{|
duration: number,
create?: LayoutAnimationAnimationConfig,
update?: LayoutAnimationAnimationConfig,
delete?: LayoutAnimationAnimationConfig,
|}>;

0 comments on commit 909b612

Please sign in to comment.