title: How to set up Flow type declarations - lint up with error "not defined"?
body: <p>I just got started with typed JS and currently am just exporting/importing my types around. After looking a few things up, I think the proper solution seems to be the idea of "declarations". </p>
  
  <p>After reading [<a href="https://flowtype.org/docs/declarations.html#pointing-your-project-to-declarations]" rel="nofollow noreferrer">https://flowtype.org/docs/declarations.html#pointing-your-project-to-declarations]</a>, I attempted the ".flowconfig"-style.</p>
  
  <p><strong>decls/types.js</strong></p>
  
  <pre><code>declare type Post = {
    feed: Connection,
  }
  
  declare type Connection = {
    edges: Array&lt;Edge&gt;,
    pageInfo: PageInfo,
  }
  
  declare type Edge = {
    cursor: number,
    node: Node,
  }
  
  declare type PageInfo = {
    endCursor: number,
    hasNextPage: boolean,
  }
  
  declare type Node = {
    id: string,
    createdAt: number,
  }
  </code></pre>
  
  <p>Then I added the <code>decls/</code> directory to my <code>.flowconfig</code> <code>[libs]</code>.</p>
  
  <p><strong>.flowconfig</strong></p>
  
  <pre><code>[libs]
  node_modules/react-native/Libraries/react-native/react-native-interface.js
  node_modules/react-native/flow
  flow/
  decls/
  </code></pre>
  
  <p>However all of the types lint up with error not defined e.g. 'Connection' is not defined.</p>
  
  <p>Is there something I missed?</p>