I am using isomorphic-fetch package inside a typescript class and trying to identify how I can return the value of the fetch api response.
somefunction(someParam: Int): Int {
fetch('myApiURL', { method: 'get'})
.then(function(res) {
return res
})
.catch(function(ex) {
return 0
})
}