From f03bc9016e343285eb3f329384f3bbccf4ecc7a9 Mon Sep 17 00:00:00 2001 From: Nathan Azaria Date: Wed, 22 Jun 2016 12:33:56 -0700 Subject: [PATCH] Fixed flowtype of ListViewDataSource to accept optional params Summary: ParamType of ListViewDataSource currently requires all the parameters to be supplied, although they are nullable. This diff fixed it and allows the parameters to be not supplied. Reviewed By: javache Differential Revision: D3462796 fbshipit-source-id: 68dee260ff0c4020b7fd2bb7031d14c980812694 --- Libraries/CustomComponents/ListView/ListViewDataSource.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/CustomComponents/ListView/ListViewDataSource.js b/Libraries/CustomComponents/ListView/ListViewDataSource.js index 6fdbee7a6..fdc135b87 100644 --- a/Libraries/CustomComponents/ListView/ListViewDataSource.js +++ b/Libraries/CustomComponents/ListView/ListViewDataSource.js @@ -51,9 +51,9 @@ type differType = (data1: any, data2: any) => bool; type ParamType = { rowHasChanged: differType; - getRowData: ?typeof defaultGetRowData; - sectionHeaderHasChanged: ?differType; - getSectionHeaderData: ?typeof defaultGetSectionHeaderData; + getRowData?: ?typeof defaultGetRowData; + sectionHeaderHasChanged?: ?differType; + getSectionHeaderData?: ?typeof defaultGetSectionHeaderData; } /**