title: Generic enum type guard
body: <p>I can write a non-generic type guard to check if a given string is a member of a string enum like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>enum MyEnum {
    Thing1 = 'thing one',
    Thing2 = 'thing two',
  }
  
  const isMyEnum = (token: any): token is MyEnum =&gt; {
    return Object.values(MyEnum).includes(token as MyEnum);
  };
  </code></pre>
  
  <p>Is it possible to make this generic, so that I could re-use the same checking logic for many different string enums?</p>