title: `Fetch` API inside a Typescript function
body: <p>I am using <code>isomorphic-fetch</code> package inside a typescript class and trying to identify how I can return the value of the fetch api response. </p>
  
  <pre><code>somefunction(someParam: Int): Int {
    fetch('myApiURL', { method: 'get'})
      .then(function(res) {
         return res
      })
      .catch(function(ex) {
         return 0
      })
  }
  </code></pre>