title: Check if value exists in enum in TypeScript
body: <p>I receive a number <code>type = 3</code> and have to check if it exists in this enum:</p>
  <pre><code>export const MESSAGE_TYPE = {
      INFO: 1,
      SUCCESS: 2,
      WARNING: 3,
      ERROR: 4,
  };
  </code></pre>
  <p>The best way I found is by getting all Enum Values as an array and using indexOf on it. But the resulting code isn't very legible:</p>
  <pre><code>if( -1 &lt; _.values( MESSAGE_TYPE ).indexOf( _.toInteger( type ) ) ) {
      // do stuff ...
  }
  </code></pre>
  <p>Is there a simpler way of doing this?</p>