title: Typescript: Custom interface type using enum
body: <p>I am working with categories with my API endpoint and so I have created this <code>enum</code> for it :</p>
  <pre class="lang-js prettyprint-override"><code>export enum categories {
    DESIGN = 'design',
    ART = 'art',
    WRITING = 'writing',
    PHOTOGRAPHY = 'photography',
    MUSIC = 'music',
    DIGITAL = 'digital',
    MEDIA = 'media'
  }
  </code></pre>
  <p>And now I want to use this to set an interface for the <code>category</code> attribute in my database.</p>
  <blockquote>
  <p><code>interface</code> for that :</p>
  </blockquote>
  <pre class="lang-js prettyprint-override"><code>interface ProjectAttrs {
    user: string;
    title: string;
    description: string;
    category:   // &lt;== I want it to be either of those values defined above
  }
  </code></pre>
  <p>How do I specify the category interface type to be either of the values defined in the enum?</p>