title: Generic type reflection in TypeScript
body: <p>Can I determine the generic type <code>T</code> in the following scenario?</p>
  
  <pre><code>class MyClass {
      constructor() {
      }
  
      GenericMethod&lt;T&gt;(): string {
          return typeof(T);           // &lt;=== this is flagged by the compiler,
                                      //      and returns undefined at runtime
      }
  }
  
  class MyClass2 {
  }
  
  alert(new MyClass().GenericMethod&lt;MyClass2&gt;());
  </code></pre>