title: TypeScript array to string literal type
body: <p>I currently have both an array of strings and a string literal union type containing the same strings:</p>
  
  <pre><code>const furniture = ['chair', 'table', 'lamp'];
  type Furniture = 'chair' | 'table' | 'lamp';
  </code></pre>
  
  <p>I need both in my application, but I am trying to keep my code DRY. So is there any way to infer one from the other?</p>
  
  <p>I basically want to say something like <code>type Furniture = [any string in furniture array]</code>, so there are no duplicate strings.</p>