I'm trying to use fetch in my async function, but flow is throwing this error
Error:(51, 26) Flow: Promise. This type is incompatible with union: type application of identifier Promise
| type parameter T
of await
this is a code that can generate this error:
async myfunc() {
const response = await fetch('example.com');
return await response.json();
}
I would like to type the response of response.json