From b7d873b1a07c863a96d8a9a494f699fdc81ede9c Mon Sep 17 00:00:00 2001 From: Naman Goel Date: Tue, 11 Apr 2017 12:17:06 -0700 Subject: [PATCH] Flow type improvements to accept co-variant types Differential Revision: D4848918 fbshipit-source-id: b8d4628431c57c8fda12fc7e2e38e5b2dab9b1ad --- Libraries/Lists/ListView/ListViewDataSource.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/Lists/ListView/ListViewDataSource.js b/Libraries/Lists/ListView/ListViewDataSource.js index 70bc43d1a..062907e17 100644 --- a/Libraries/Lists/ListView/ListViewDataSource.js +++ b/Libraries/Lists/ListView/ListViewDataSource.js @@ -139,10 +139,10 @@ class ListViewDataSource { * this function as the `dataBlob`. */ cloneWithRows( - dataBlob: Array | {[key: string]: any}, - rowIdentities: ?Array + dataBlob: $ReadOnlyArray | {+[key: string]: any}, + rowIdentities: ?$ReadOnlyArray ): ListViewDataSource { - var rowIds = rowIdentities ? [rowIdentities] : null; + var rowIds = rowIdentities ? [[...rowIdentities]] : null; if (!this._sectionHeaderHasChanged) { this._sectionHeaderHasChanged = () => false; }