You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In async functions - verify that one of the following happens on every single return value from a function returning a promise - or on arguments that are promise typed:
await expression
Promise is returned
Promise is used as an argument to a different function invocation
The text was updated successfully, but these errors were encountered:
I don't think this is really needed. Usually you will have a single entrypoint being non-async - or simple one liners that just return a promise they call (because that is what the function does). I don't think it is worth trying to fix up on this until we see such needs.
Why not just ignore if the function is async and use the same logic?
We just have to make sure people can call .then and not get the error. Or just require that they make the function async and await...
To keep it simple really :) It is not just then that you can call in non async functions that should silence the error. Various promise implementations have various utility methods that does the same thing. I'd rather fix the common case first and then see if we run into problems with non-async functions later, rather than trying to fix everything now and potentially annoy people when they use their own fancy promise library.
In async functions - verify that one of the following happens on every single return value from a function returning a promise - or on arguments that are promise typed:
await
expressionThe text was updated successfully, but these errors were encountered: