[React Native] Improved typings for FlatList and SectionList

This commit is contained in:
dinzo
2017-05-30 18:06:18 -04:00
parent f3704a6fe5
commit 2effdbca8c

View File

@@ -3428,7 +3428,7 @@ export interface ViewabilityConfig {
/**
* @see https://facebook.github.io/react-native/docs/flatlist.html#props
*/
export interface FlatListProperties<ItemT> {
export interface FlatListProperties<ItemT> extends ScrollViewProperties {
/**
* Rendered in between each item, but not at the top or bottom
@@ -3436,14 +3436,14 @@ export interface FlatListProperties<ItemT> {
ItemSeparatorComponent?: React.ComponentClass<any> | null
/**
* Rendered at the bottom of all the items.
* Rendered at the very end of the list.
*/
ListFooterComponent?: React.ComponentClass<any> | null
ListFooterComponent?: React.ComponentClass<any> | (() => React.ReactElement<any>) | null
/**
* Rendered at the top of all the items.
* Rendered at the very beginning of the list.
*/
ListHeaderComponent?: React.ComponentClass<any> | null
ListHeaderComponent?: React.ComponentClass<any> | (() => React.ReactElement<any>) | null
/**
* Optional custom style for multi-item rows generated when numColumns > 1
@@ -3621,12 +3621,12 @@ export interface SectionListProperties<ItemT> extends ScrollViewProperties {
/**
* Rendered at the very end of the list.
*/
ListFooterComponent?: React.ComponentClass<any> | null
ListFooterComponent?: React.ComponentClass<any> | (() => React.ReactElement<any>) | null
/**
* Rendered at the very beginning of the list.
*/
ListHeaderComponent?: React.ComponentClass<any> | null
ListHeaderComponent?: React.ComponentClass<any> | (() => React.ReactElement<any>) | null
/**
* Rendered in between each section.