title: How does vscode get Type Inference Result during using Typescript
body: <p>I hava write some code write in vscode like:</p>
  <pre class="lang-js prettyprint-override"><code>function sum(a:number, b:number) {
    return a + b
  }
  </code></pre>
  <p>Meanwhile, vscode give the user some tips which contains Type inference of this function return value.</p>
  <p><a href="https://i.stack.imgur.com/GmtO1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GmtO1.png" alt="enter image description here" /></a>
  How does vscode get that auto type inference result, is there some lib or typescript API can get result?</p>