title: TypeScript require generic parameter to be provided
body: <p>I have the following function:</p>
  
  
  
  <pre><code>async function get&lt;U&gt;(url: string): Promise&lt;U&gt; {
      return getUrl&lt;u&gt;(url);
  }
  </code></pre>
  
  <p>However, it is possible to call it like this (U is set to any by TS):</p>
  
  
  
  <pre><code>get('/user-url');
  </code></pre>
  
  <p>Is there a way to define this function such that it requires U to be provided explicitly, as in</p>
  
  
  
  <pre><code>get&lt;User&gt;('/user-url');
  </code></pre>