diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 629c8a8fd5..1229f55acb 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -3491,7 +3491,7 @@ export interface FlatListProperties extends VirtualizedListProperties | null + ItemSeparatorComponent?: React.ComponentClass | React.ReactElement | (() => React.ReactElement) | null /** * Rendered when the list is empty. diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index 29ff38508a..925d50f61c 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -208,11 +208,22 @@ InteractionManager.runAfterInteractions(() => { }).then(() => 'done') export class FlatListTest extends React.Component, {}> { + _renderItem = (rowData: any) => { + return ( + + {rowData.item} + + ); + } + + _renderSeparator= () => + render() { return ( {info.item}} + renderItem={this._renderItem} + ItemSeparatorComponent={this._renderSeparator} /> ); }