The only advantage of async is the visual marker, which the function (always) returns a promise, and you donβt even need to scan the body of the function for the return . This can be useful for consistency if you have an async function s string.
In addition: there is absolutely zero gain from him. This is no worse than transferring the return value to an additional call to Promise.resolve() . If the body of your function consists only of a return with a promise (either new Promise or another function call), I recommend not using async .
In general, if your function body does not contain an await expression, you probably also will not need the async . An exception to the rule is when you want to make sure that the function always returns a promise, even if an exception occurs in the code that should lead to the rejection of the promise.
source share