diff --git a/Libraries/Lists/FlatList.d.ts b/Libraries/Lists/FlatList.d.ts index 0cb4302f1ee080..e838ef650a0562 100644 --- a/Libraries/Lists/FlatList.d.ts +++ b/Libraries/Lists/FlatList.d.ts @@ -19,48 +19,6 @@ import {ViewStyle} from '../StyleSheet/StyleSheetTypes'; import {View} from '../Components/View/View'; export interface FlatListProps extends VirtualizedListProps { - /** - * Rendered in between each item, but not at the top or bottom - */ - ItemSeparatorComponent?: React.ComponentType | null | undefined; - - /** - * Rendered when the list is empty. - */ - ListEmptyComponent?: - | React.ComponentType - | React.ReactElement - | null - | undefined; - - /** - * Rendered at the very end of the list. - */ - ListFooterComponent?: - | React.ComponentType - | React.ReactElement - | null - | undefined; - - /** - * Styling for internal View for ListFooterComponent - */ - ListFooterComponentStyle?: StyleProp | undefined; - - /** - * Rendered at the very beginning of the list. - */ - ListHeaderComponent?: - | React.ComponentType - | React.ReactElement - | null - | undefined; - - /** - * Styling for internal View for ListHeaderComponent - */ - ListHeaderComponentStyle?: StyleProp | undefined; - /** * Optional custom style for multi-item rows generated when numColumns > 1 */ diff --git a/Libraries/Lists/SectionList.d.ts b/Libraries/Lists/SectionList.d.ts index 48c24b1a60f9d2..ae1b10df46a10d 100644 --- a/Libraries/Lists/SectionList.d.ts +++ b/Libraries/Lists/SectionList.d.ts @@ -61,48 +61,6 @@ export type SectionListRenderItem = ( export interface SectionListProps extends VirtualizedListWithoutRenderItemProps { - /** - * Rendered in between adjacent Items within each section. - */ - ItemSeparatorComponent?: React.ComponentType | null | undefined; - - /** - * Rendered when the list is empty. - */ - ListEmptyComponent?: - | React.ComponentType - | React.ReactElement - | null - | undefined; - - /** - * Rendered at the very end of the list. - */ - ListFooterComponent?: - | React.ComponentType - | React.ReactElement - | null - | undefined; - - /** - * Styling for internal View for ListFooterComponent - */ - ListFooterComponentStyle?: StyleProp | undefined | null; - - /** - * Rendered at the very beginning of the list. - */ - ListHeaderComponent?: - | React.ComponentType - | React.ReactElement - | null - | undefined; - - /** - * Styling for internal View for ListHeaderComponent - */ - ListHeaderComponentStyle?: StyleProp | undefined | null; - /** * Rendered in between each section. */ diff --git a/Libraries/Lists/VirtualizedList.d.ts b/Libraries/Lists/VirtualizedList.d.ts index 29c040a236ca96..3a4bbfe0c0c9a7 100644 --- a/Libraries/Lists/VirtualizedList.d.ts +++ b/Libraries/Lists/VirtualizedList.d.ts @@ -9,6 +9,8 @@ import type * as React from 'react'; import type {LayoutChangeEvent} from '../../types'; +import {StyleProp} from '../StyleSheet/StyleSheet'; +import {ViewStyle} from '../StyleSheet/StyleSheetTypes'; import type {ScrollViewProps} from '../Components/ScrollView/ScrollView'; export interface ViewToken { @@ -124,6 +126,11 @@ export interface VirtualizedListProps export interface VirtualizedListWithoutRenderItemProps extends ScrollViewProps { + /** + * Rendered in between each item, but not at the top or bottom + */ + ItemSeparatorComponent?: React.ComponentType | null | undefined; + /** * Rendered when the list is empty. Can be a React Component Class, a render function, or * a rendered element. @@ -144,6 +151,11 @@ export interface VirtualizedListWithoutRenderItemProps | null | undefined; + /** + * Styling for internal View for ListFooterComponent + */ + ListFooterComponentStyle?: StyleProp | undefined; + /** * Rendered at the top of all the items. Can be a React Component Class, a render function, or * a rendered element. @@ -154,6 +166,11 @@ export interface VirtualizedListWithoutRenderItemProps | null | undefined; + /** + * Styling for internal View for ListHeaderComponent + */ + ListHeaderComponentStyle?: StyleProp | undefined; + /** * The default accessor functions assume this is an Array<{key: string}> but you can override * getItem, getItemCount, and keyExtractor to handle any type of index-based data.