title: Typescript: Use `enum` values as `type`
body: <p>I would like to use following <code>enum</code>'s values:</p>
  
  <pre class="lang-js prettyprint-override"><code>export enum GenFormats {
      SHORT_LOWER = 'm/f', SHORT_UPPER = 'M/F', FULL = 'Male/Female'
  };
  </code></pre>
  
  <p>as type given below:</p>
  
  <pre><code>export interface IGenderOptions {
      format: 'm/f' | 'M/F' | 'Male/Female'
  };
  </code></pre>
  
  <p>by using Type extraction/definition something like:</p>
  
  <pre><code>{{some type cast/logic}}&lt;GenFormats&gt;    // Outputs: 'm/f' | 'M/F' | 'Male/Female'
  </code></pre>
  
  <h1>Updated Question:</h1>
  
  <p>Here is my code:</p>
  
  <pre><code>export enum EGenderFormats {
      SHORT_LOWER = 'm/f', SHORT_UPPER = 'M/F', FULL = 'Male/Female'
  };
  
  export interface IGenderFormats {
      SHORT_LOWER: 'm/f'; SHORT_UPPER: 'M/F'; FULL: 'Male/Female';
  };
  
  export interface IGenderOptions {
      format: IGenderFormats[keyof IGenderFormats]
  };
  
  const DEFAULTS: IGenderOptions = {
      format: EGenderFormats.FULL
  };
  </code></pre>
  
  <p>My question is, how can I use single entity either <code>enum EGenderFormats</code> or <code>interface IGenderFormats</code> instead of both?</p>
  
  <p>I am using Typescript 3.2.2</p>
  
  <p>Thanks</p>