Skip to content

Commit

Permalink
Improve readme on nullish values in await using (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
papb committed Jul 6, 2023
1 parent 2af9787 commit 40f272f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Expand Up @@ -818,10 +818,9 @@ order.

### `await using` Declarations and `null` or `undefined` Values

This proposal has opted to ignore `null` and `undefined` values provided to `await using` declarations. This is similar
to the behavior of `using` in the original [Explicit Resource Management][using] proposal, which also
allows `null` and `undefined`, as well as C#, which also allows `null`,. One primary reason for this behavior is to
simplify a common case where a resource might be optional, without requiring duplication of work or needless
This proposal has opted to ignore `null` and `undefined` values provided to `await using` declarations. This is
consistent with the proposed behavior for the `using` declarations in this proposal. Like in the sync case, this allows
simplifying a common case where a resource might be optional, without requiring duplication of work or needless
allocations:

```js
Expand Down

0 comments on commit 40f272f

Please sign in to comment.