react-native: allow undefined for data in FlatListProps. (#41641)

This commit is contained in:
Kelvin Chu
2020-01-16 11:38:06 -05:00
committed by Eli Barzilay
parent 02820af95f
commit a60bd95d8c
+2 -1
View File
@@ -29,6 +29,7 @@
// Xianming Zhong <https://github.com/chinesedfan>
// Valentyn Tolochko <https://github.com/vtolochk>
// Sergey Sychev <https://github.com/SychevSP>
// Kelvin Chu <https://github.com/RageBill>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@@ -3859,7 +3860,7 @@ export interface FlatListProps<ItemT> extends VirtualizedListProps<ItemT> {
* For simplicity, data is just a plain array. If you want to use something else,
* like an immutable list, use the underlying VirtualizedList directly.
*/
data: ReadonlyArray<ItemT> | null;
data: ReadonlyArray<ItemT> | null | undefined;
/**
* A marker property for telling the list to re-render (since it implements PureComponent).