2022-02-04 16:28:24 +00:00

44 lines
630 B
Plaintext

An ``++async++`` function always wraps the return value in a ``++Promise++``. Using ``++return await++`` is therefore redundant.
== Noncompliant Code Example
[source,javascript]
----
async function foo() {
// ...
}
async function bar() {
// ...
return await foo(); // Noncompliant
}
----
== Compliant Solution
[source,javascript]
----
async function foo() {
// ...
}
async function bar() {
// ...
return foo();
}
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
include::highlighting.adoc[]
endif::env-github,rspecator-view[]