title: Difference between string enums and string literal types in TS
body: <p>Assuming I want to ensure that <code>myKey</code> in <code>{ myKey: '' }</code> only contains the strings <code>foo</code>, <code>bar</code>, <code>baz</code>, I could achieve this in two ways.</p>
  
  <pre><code>   // with a String Literal Type 
     type MyKeyType = 'foo' | 'bar' | 'baz';
  
      // or with a String Enum   
      enum MyKeyType {
         FOO = 'foo',
         BAR = 'bar',
         BAZ = 'baz'
      }
  </code></pre>
  
  <p>I wonder where the pros and cons of one over the other are, as both look the same to me (exept from the way I would access the values for e.g. a condition check).</p>
  
  <p>The only difference I found in the TS documentation is that Enums are real objects at runtime, what might be desirable in some cases.</p>