title: how to get union types from array in flow?
body: <p>I have array of text strings and I'm using it in another place. How to convert it in union types?</p>
  
  <p>how to get:</p>
  
  <pre><code>type Message = 'hello world' | ...
  </code></pre>
  
  <p>from </p>
  
  <pre><code>const messages = ['hello world', ...]
  </code></pre>