flowjs / flow.js

A JavaScript library providing multiple simultaneous, stable, fault-tolerant and resumable/restartable file uploads via the HTML5 File API.
Other
2.96k stars 346 forks source link

Object.entries always returns type [ string, mixed ] #320

Closed lawlietmester closed 3 years ago

lawlietmester commented 3 years ago

Object.entries always returns type [ string, mixed ].

But for example once I have

var start: { [ string ]: string } = { 'a': 'one', 'b': 'two', 'c': 'three' };
var end: Array<[ string, string ]> = Object.entries( start ); 
// ^ Flow thinks this is Array<[ string, mixed ]>

This will throw the error about mixed as 2nd element in array.

Tested on version 0.135

drzraf commented 3 years ago

There is no occurrence of Object.entries in the code, nor version 0.135.