title: Extending Enum in typescript
body: <p>I was hoping to reuse certain values in enum.
  Any suggestions of how to achieve such functionality.</p>
  
  <pre><code>enum someEnum {
      a = 'Some String',
      b = 2,
  };
  
  enum extendedEnum {
      c = 'string',
      b = someEnum.b
  }
  
  type someEnumType&lt;T extends someEnum&gt; = T extends someEnum.a ? string :
      T extends someEnum.b ? number : never;
  
  type extendedEnumType&lt;T extends extendedEnum&gt; =
      T extends extendedEnum.c ? string:          // Gives Error
      T extends extendedEnum.b ? number : never;  // Gives Error
  </code></pre>