From a60bd95d8c1a5a21f45c855b5c97d5d7e9d5cfdc Mon Sep 17 00:00:00 2001 From: Kelvin Chu Date: Fri, 17 Jan 2020 00:38:06 +0800 Subject: [PATCH] react-native: allow undefined for data in FlatListProps. (#41641) --- types/react-native/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 7cb8943327..e5ff751308 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -29,6 +29,7 @@ // Xianming Zhong // Valentyn Tolochko // Sergey Sychev +// Kelvin Chu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -3859,7 +3860,7 @@ export interface FlatListProps extends VirtualizedListProps { * 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 | null; + data: ReadonlyArray | null | undefined; /** * A marker property for telling the list to re-render (since it implements PureComponent).