Modify rule S4822: Avoid repetitive usage of 'await' (#3135)

This commit is contained in:
Yassin Kammoun 2023-09-25 09:52:55 +02:00 committed by GitHub
parent 9372724e74
commit ba9ed3e319
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ function foo() {
}
----
Alternatively, wait for the Promise fulfillment value using ``++await++``. `await` is used to unwrap promises. `await` pauses the execution of its surrounding `async` function until the promise is settled (that is, fulfilled or rejected). Any errors that occur within the Promise will be thrown as exceptions.
Alternatively, wait for the Promise fulfillment value using ``++await++``. It is used to unwrap promises and pauses the execution of its surrounding `async` function until the promise is settled (that is, fulfilled or rejected). Any errors that occur within the Promise will be thrown as exceptions.
[source,javascript,diff-id=1,diff-type=compliant]
----