42 lines
590 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
An ``++async++`` function always wraps the return value in a ``++Promise++``. Using ``++return await++`` is therefore redundant.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
async function foo() {
// ...
}
async function bar() {
// ...
return await foo(); // Noncompliant
}
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
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[]