diff --git a/packages/react-native/Libraries/Animated/AnimatedExports.js.flow b/packages/react-native/Libraries/Animated/AnimatedExports.js.flow index 18f56ec1e5a..6559cd2ff86 100644 --- a/packages/react-native/Libraries/Animated/AnimatedExports.js.flow +++ b/packages/react-native/Libraries/Animated/AnimatedExports.js.flow @@ -38,6 +38,7 @@ export type {default as AnimatedModulo} from './nodes/AnimatedModulo'; export type {default as AnimatedMultiplication} from './nodes/AnimatedMultiplication'; export type {default as AnimatedSubtraction} from './nodes/AnimatedSubtraction'; export type {WithAnimatedValue} from './createAnimatedComponent'; +export type {AnimatedComponentType as AnimatedComponent} from './createAnimatedComponent'; export const add = AnimatedImplementation.add; export const attachNativeEvent = AnimatedImplementation.attachNativeEvent; diff --git a/packages/react-native/Libraries/Components/ScrollView/ScrollView.js b/packages/react-native/Libraries/Components/ScrollView/ScrollView.js index 0af6662b660..14806cf9895 100644 --- a/packages/react-native/Libraries/Components/ScrollView/ScrollView.js +++ b/packages/react-native/Libraries/Components/ScrollView/ScrollView.js @@ -390,11 +390,7 @@ type StickyHeaderComponentType = component( ...ScrollViewStickyHeaderProps ); -export type ScrollViewProps = $ReadOnly<{ - ...ViewProps, - ...ScrollViewPropsIOS, - ...ScrollViewPropsAndroid, - +type ScrollViewBaseProps = $ReadOnly<{ /** * These styles will be applied to the scroll view content container which * wraps all of the child views. Example: @@ -672,6 +668,13 @@ export type ScrollViewProps = $ReadOnly<{ scrollViewRef?: React.RefSetter, }>; +export type ScrollViewProps = $ReadOnly<{ + ...ViewProps, + ...ScrollViewPropsIOS, + ...ScrollViewPropsAndroid, + ...ScrollViewBaseProps, +}>; + type ScrollViewState = { layoutHeight: ?number, }; diff --git a/packages/react-native/Libraries/Lists/SectionList.js b/packages/react-native/Libraries/Lists/SectionList.js index 1d06b959897..320b52aa64c 100644 --- a/packages/react-native/Libraries/Lists/SectionList.js +++ b/packages/react-native/Libraries/Lists/SectionList.js @@ -170,7 +170,7 @@ export type SectionListProps = { * */ export default class SectionList< - ItemT, + ItemT = any, SectionT = DefaultSectionT, > extends React.PureComponent> { props: SectionListProps; diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap index cd234ade9a4..595074915d2 100644 --- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap +++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap @@ -191,6 +191,7 @@ export type { default as AnimatedModulo } from \\"./nodes/AnimatedModulo\\"; export type { default as AnimatedMultiplication } from \\"./nodes/AnimatedMultiplication\\"; export type { default as AnimatedSubtraction } from \\"./nodes/AnimatedSubtraction\\"; export type { WithAnimatedValue } from \\"./createAnimatedComponent\\"; +export type { AnimatedComponentType as AnimatedComponent } from \\"./createAnimatedComponent\\"; declare export const add: $FlowFixMe; declare export const attachNativeEvent: $FlowFixMe; declare export const createAnimatedComponent: $FlowFixMe; @@ -2020,10 +2021,7 @@ type StickyHeaderComponentType = component( >, ...ScrollViewStickyHeaderProps ); -export type ScrollViewProps = $ReadOnly<{ - ...ViewProps, - ...ScrollViewPropsIOS, - ...ScrollViewPropsAndroid, +type ScrollViewBaseProps = $ReadOnly<{ contentContainerStyle?: ?ViewStyleProp, contentOffset?: ?PointProp, disableIntervalMomentum?: ?boolean, @@ -2065,6 +2063,12 @@ export type ScrollViewProps = $ReadOnly<{ innerViewRef?: React.RefSetter, scrollViewRef?: React.RefSetter, }>; +export type ScrollViewProps = $ReadOnly<{ + ...ViewProps, + ...ScrollViewPropsIOS, + ...ScrollViewPropsAndroid, + ...ScrollViewBaseProps, +}>; export type ScrollViewComponentStatics = $ReadOnly<{ Context: typeof ScrollViewContext, }>; @@ -5011,8 +5015,10 @@ export type SectionListProps = { ...RequiredProps, ...OptionalProps, }; -declare export default class SectionList - extends React.PureComponent> +declare export default class SectionList< + ItemT = any, + SectionT = DefaultSectionT, +> extends React.PureComponent> { props: SectionListProps; scrollToLocation(params: ScrollToLocationParamsType): void;