title: Does TypeScript allow a type alias to specify generics?
body: <p>I would like to be able to alias a very generic function and specify <em>part</em> of the generic parameters, thus creating a less generic version of the same function. Something like the following:</p>
  
  <pre><code>function veryGeneric&lt;X, Y&gt;(someParam: Y): { result: X } {
    // ...
  }
  
  type LessGeneric = typeof veryGeneric&lt;X, string&gt;
  const lessGeneric: LessGeneric = veryGeneric
  </code></pre>
  
  <p>Where I would want the <code>lessGeneric</code> function to essentially be typed as:</p>
  
  <pre><code>function lessGeneric&lt;X&gt;(someParam: string): { result: X } {
    // ...
  }
  </code></pre>
  
  <p>Is this possible in any way?</p>
  
  <p>I know I could create a wrapper function, but I would prefer to not have to specify the parameter typings again (and not having to pay the overhead of another function call, even if it’s tiny, would be a bonus).</p>
  
  <hr>
  
  <p>Here’s the real example I’m dealing with. Given a function declaration (from <a href="https://github.com/alloy/DefinitelyTyped/blob/react-tracking/types/react-tracking/index.d.ts#L60" rel="nofollow noreferrer">react-tracking</a>) like the following:</p>
  
  <pre><code>declare function track&lt;T = {}, P = {}&gt;(trackingInfo?: TrackingInfo&lt;T, P&gt;, options?: Options&lt;Partial&lt;T&gt;&gt;): Decorator
  </code></pre>
  
  <p>I want to be able to define an alias that specifies the <code>trackingInfo</code> parameter’s typing but leaves <code>P</code> generic. i.e. I want an alias that’s essentially typed as:</p>
  
  <pre><code>interface ValidAnalyticsEntries {
    page: string
    action: string
  }
  
  declare function trackSpecificToOurAnalyticsSchema&lt;P = {}&gt;(trackingInfo?: TrackingInfo&lt;ValidAnalyticsEntries, P&gt;, options?: Options&lt;Partial&lt;ValidAnalyticsEntries&gt;&gt;): Decorator
  </code></pre>