diff --git a/Libraries/Animated/src/createAnimatedComponent.js b/Libraries/Animated/src/createAnimatedComponent.js index 4c0dc34c0f4..4a47ce6203e 100644 --- a/Libraries/Animated/src/createAnimatedComponent.js +++ b/Libraries/Animated/src/createAnimatedComponent.js @@ -17,15 +17,12 @@ const React = require('react'); const invariant = require('invariant'); const setAndForwardRef = require('../../Utilities/setAndForwardRef'); -export type AnimatedComponentType = React.AbstractComponent< - any, - $ReadOnly<{ - setNativeProps: Object => void, - getNode: () => React.ElementRef>, - }>, ->; +export type AnimatedComponentType< + Props: {+[string]: mixed}, + Instance, +> = React.AbstractComponent<$ObjMap any>, Instance>; -function createAnimatedComponent( +function createAnimatedComponent( Component: React.AbstractComponent, ): AnimatedComponentType { invariant( diff --git a/RNTester/js/examples/FlatList/FlatListExample.js b/RNTester/js/examples/FlatList/FlatListExample.js index e71b9acd6d4..e241652f764 100644 --- a/RNTester/js/examples/FlatList/FlatListExample.js +++ b/RNTester/js/examples/FlatList/FlatListExample.js @@ -247,7 +247,7 @@ class FlatListExample extends React.PureComponent { this._listRef.getNode().recordInteraction(); pressItem(this, key); }; - _listRef: Animated.FlatList; + _listRef: React.ElementRef; } const styles = StyleSheet.create({ diff --git a/RNTester/js/examples/SectionList/SectionListExample.js b/RNTester/js/examples/SectionList/SectionListExample.js index 3046602e30f..193c9eb7da8 100644 --- a/RNTester/js/examples/SectionList/SectionListExample.js +++ b/RNTester/js/examples/SectionList/SectionListExample.js @@ -92,7 +92,7 @@ class SectionListExample extends React.PureComponent<{}, $FlowFixMeState> { {useNativeDriver: true}, ); - _sectionListRef: Animated.SectionList; + _sectionListRef: React.ElementRef; _captureRef = ref => { this._sectionListRef = ref; };