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 коммит произвёл Facebook Github Bot
Родитель 18525ce8c5
Коммит b7d873b1a0
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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;
}