Flow type improvements to accept co-variant types

Differential Revision: D4848918

fbshipit-source-id: b8d4628431c57c8fda12fc7e2e38e5b2dab9b1ad
This commit is contained in:
Naman Goel 2017-04-11 12:17:06 -07:00 committed by Facebook Github Bot
parent 18525ce8c5
commit b7d873b1a0
1 changed files with 3 additions and 3 deletions

View File

@ -139,10 +139,10 @@ class ListViewDataSource {
* this function as the `dataBlob`.
*/
cloneWithRows(
dataBlob: Array<any> | {[key: string]: any},
rowIdentities: ?Array<string>
dataBlob: $ReadOnlyArray<any> | {+[key: string]: any},
rowIdentities: ?$ReadOnlyArray<string>
): ListViewDataSource {
var rowIds = rowIdentities ? [rowIdentities] : null;
var rowIds = rowIdentities ? [[...rowIdentities]] : null;
if (!this._sectionHeaderHasChanged) {
this._sectionHeaderHasChanged = () => false;
}