From 2effdbca8c5eff888cd3dccba4124be1c9cfbffb Mon Sep 17 00:00:00 2001 From: dinzo Date: Tue, 30 May 2017 18:06:18 -0400 Subject: [PATCH] [React Native] Improved typings for FlatList and SectionList --- types/react-native/index.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 4db13a47e0..2e22ad489b 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -3428,7 +3428,7 @@ export interface ViewabilityConfig { /** * @see https://facebook.github.io/react-native/docs/flatlist.html#props */ -export interface FlatListProperties { +export interface FlatListProperties extends ScrollViewProperties { /** * Rendered in between each item, but not at the top or bottom @@ -3436,14 +3436,14 @@ export interface FlatListProperties { ItemSeparatorComponent?: React.ComponentClass | null /** - * Rendered at the bottom of all the items. + * Rendered at the very end of the list. */ - ListFooterComponent?: React.ComponentClass | null + ListFooterComponent?: React.ComponentClass | (() => React.ReactElement) | null /** - * Rendered at the top of all the items. + * Rendered at the very beginning of the list. */ - ListHeaderComponent?: React.ComponentClass | null + ListHeaderComponent?: React.ComponentClass | (() => React.ReactElement) | null /** * Optional custom style for multi-item rows generated when numColumns > 1 @@ -3621,12 +3621,12 @@ export interface SectionListProperties extends ScrollViewProperties { /** * Rendered at the very end of the list. */ - ListFooterComponent?: React.ComponentClass | null + ListFooterComponent?: React.ComponentClass | (() => React.ReactElement) | null /** * Rendered at the very beginning of the list. */ - ListHeaderComponent?: React.ComponentClass | null + ListHeaderComponent?: React.ComponentClass | (() => React.ReactElement) | null /** * Rendered in between each section.