title: TypeScript function to return nullable Promise
body: <p>I'm trying to create a function that returns a Promise with values that can be resolved to null.</p>
  <p>Basically something like this:</p>
  <pre class="lang-ts prettyprint-override"><code>static getUserById(ids: String): Promise&lt;?User&gt; {
    // do something
  }
  </code></pre>
  <p>but it is returning an error</p>
  <blockquote>
  <p>Generic type 'Promise' requires 1 type argument(s)</p>
  </blockquote>
  <p>How to create a function in TypeScript that can return a Promise with nullable resolved values?</p>