title: How do I check if a JavaScript function returns a Promise?
body: <p>Say I have two functions:</p>
  
  <pre><code>function f1() {
      return new Promise&lt;any&gt;((resolve, reject) =&gt; {
          resolve(true);
      });
  }
  
  function f2() {
  }
  </code></pre>
  
  <p>How do I know if <code>f1</code> will return <code>Promise</code> and <code>f2</code> will not?</p>