title: How to get parameter types of a generic function with instantiated generic type parameters?
body: <p>My goal is to extract the <code>Parameter</code> types of a generic typed function into a new generic type which I can use later:</p>
  <pre class="lang-js prettyprint-override"><code>// we have a given function like this:
  function genericFunction&lt;T&gt;(a: T) {
    return a;
  }
  
  type genericParamsType = Parameters&lt;typeof genericFunction&gt;; // this will resolve to a type of [unknown]
  // I would like to achieve something like this:
  // type genericParamsType&lt;PassDownType&gt; = Parameters&lt;typeof genericFunction&lt;PassDownType&gt;&gt;;
  // but that is a syntax error
  
  // if it would work, I could the following:
  // const newparams: genericParamsType&lt;string&gt; = [&quot;hello&quot;] // correct
  // const newparams2: genericParamsType&lt;number&gt; = [&quot;hello&quot;] // error because its not a string
  </code></pre>
  <p><a href="https://tsplay.dev/w1PaXW" rel="nofollow noreferrer">Playground</a></p>