title: TypeScript - type parameter not recognized in tsx file?
body: <p>I have an example file called "test.ts" with this code:</p>
  
  <pre><code>const test = &lt;T&gt;(a: string) =&gt; { return a; } ;
  </code></pre>
  
  <p>It works! If I rename the file to "test.tsx" then Visual Studio Code marks the T parameter with red, and gives the following error:</p>
  
  <pre><code>[ts] Cannot find name 'T'.
  
  [ts] JSX element 'T' has no corresponding close tag.
  </code></pre>
  
  <p>I must use .tsx extension because the actual code needs to return JSX elements. I also must use type parameters. But how can I do both?</p>