title: Flow.js Inferring Return Type from Node Module
body: <p>I am typing a node module using <code>declare module</code> using Flow.js with a union return type.</p>
  
  <pre><code>declare module 'mymodule' {
    declare export default {
      myFunction: () =&gt; string | { errors: [] },
    }
  }
  </code></pre>
  
  <p>But then when I use it in my application</p>
  
  <pre><code>import myModule from 'mymodule'
  
  const { errors } = myModule.myFunction()
  </code></pre>
  
  <p>Somehow Flow.js is saying that it should be a string, and that <code>errors</code> does not exist on that returned value from <code>myFunction()</code>. In other words, it is inferring that it is a string even though it could be an object with <code>errors</code>.</p>
  
  <p>Is Flow.js digging into the node module logic? I didn't think it went that far.</p>
  
  <p>Am I missing something obvious here?</p>