tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

reject-multiple-await.rst (606B)


      1 reject-multiple-await
      2 =====================
      3 
      4 Disallows using `await await somePromise`. While this is valid syntax, this
      5 usually unintentional and can have a slightly different behavior from using a
      6 single `await`. Using `await await` should ideally be explained with a comment.
      7 
      8 Examples of incorrect code for this rule:
      9 -----------------------------------------
     10 
     11 .. code-block:: js
     12 
     13    await await somePromise;
     14    await await await somePromise;
     15    await (await somePromise);
     16 
     17 
     18 Examples of correct code for this rule:
     19 ---------------------------------------
     20 
     21 .. code-block:: js
     22 
     23    await somePromise;