title: How can I type a default export using Flow?
body: <h1>How can I type a default export using Flow? Does Flow have a way of accomplishing this?</h1>
  <h2>Desired Outcome:</h2>
  <pre><code>// index.js
  type complexThing = {
    a: string
  }
  type Thing = {
    x: number,
    y: boolean,
    z: complexThing
  }
  
  export default {
   x: 0,
   y: true,
   z: {a: 'hello'}
  } : Thing // this says my default export is a Thing
  </code></pre>
  <h2>Acceptable Alternative:</h2>
  <p>Alternatively, I wouldn't mind typing each of the object properties inline, but I think that's syntactically impossible:</p>
  <pre><code>export default {
   // I don't know how to add type signatures here
   x: 0, // number
   y: true, // boolean
   z: {a: 'hello'} // complexThing
  }
  </code></pre>
  <h2>Not What I Want:</h2>
  <p>What I <em>don't</em> want to do is store a variable just to to Flow type it:</p>
  <pre><code>// index.js
  type complexThing = {
    a: string
  }
  type Thing = {
    x: number,
    y: boolean,
    z: complexThing
  }
  
  const myThing: Thing = {
   x: 0,
   y: true,
   z: {a: 'hello'}
  }
  
  export default myThing
  </code></pre>