title: Checking type of a generic param in typescript
body: <p>I am working in a react app using typescript. One of the functions receives a generic type in one of the variables.</p>
  
  <p>How can I check the type T of the variable? Is this possible?</p>
  
  <pre><code>MyFunction&lt;T&gt;(newValues: Array&lt;T&gt;) {
      if (typeof T === "string") {
          // do some stuff
      }
  }
  </code></pre>