title: Return type for an empty Promise.resole() new Promise Typescript
body: <p>I'm struggling with <code>return type</code> for the current function (example):</p>
  <pre><code>const someFunction = () =&gt; {
      if (condition) {
          return Promise.resolve()
      }
      return new Promise(resolve =&gt; setTimeout(resolve, 1000))
  }
  </code></pre>
  <p>How do I define a <code>type</code> that this function returns?</p>
  <p>I know that I can set <code>unknown</code> or <code>any</code>, but I'm looking for a cleaner approach.</p>