title: Enum as Parameter in TypeScript
body: <p>Isn't it possible to set the type of a parameter to an Enum?      Like this:</p>
  <pre><code>private getRandomElementOfEnum(e : enum):string{
      var length:number = Object.keys(e).length;
      return e[Math.floor((Math.random() * length)+1)];
  }
  </code></pre>
  <p>Following error is thrown by compilation:</p>
  <blockquote>
  <p>Argument expression expected.(1135)</p>
  </blockquote>
  <p>With <code>any</code> obviously everyhting is alright:</p>
  <pre><code>private getRandomElementOfEnum(e : any):string{
      var length:number = Object.keys(e).length;
      return e[Math.floor((Math.random() * length)+1)];
  }
  </code></pre>
  <p>This Code works fine. but isn't as elegant and typesafe.</p>
  <p>Is there a possibility or a little workaround to define an enum as a parameter?</p>