Reproduction :
Try it
Context :
When calling a function called 'foo' returning a promise with await, the type of the variable is still Promise.
Flow correctly interprets the value if we just return the variable, but triggers an error if we type the return of the function called 'bar'.
Is there any issue / PR related, or a common workaround ? Casting with any didn't seem to solve the error.
The return of the function is a Promise
After await is only T
The behavior is correct
Most helpful comment
The return of the function is a Promise
After await is only T
The behavior is correct