title: Flow: Object type incompatible with Array<mixed>
body: <p>I don’t understand the flow error I’m currently getting. I have a Javascript object of objects (<code>dataObject</code>) that I want to convert to an array of objects, so I do so using <code>Object.values(dataObject)</code>. Then, I iterate through each object in the array with the following: </p>
  
  <pre><code>  const dataObjectArray = Object.values(dataObject);
    return dataObjectArray((data: DataObject) =&gt; {
      const { typeA, typeB } = data;
      return {
        TYPE_A: typeA,
        TYPE_B: typeB,
      };
    });
  </code></pre>
  
  <p>But I get the following flowtype error:</p>
  
  <p><a href="https://i.stack.imgur.com/x6uFv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x6uFv.png" alt="flow error"></a></p>
  
  <p>I’m not sure how to match up the types. Currently my DataObject flow type is </p>
  
  <pre><code>type DataObject = {
      typeA: string,
      typeB: string,
  };
  </code></pre>
  
  <p>Any help would be appreciated. Thanks!</p>