Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato committed Aug 2, 2024
1 parent dd56f97 commit 9a79b42
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6211,7 +6211,7 @@ only [=list/items=] that are of type |T|.

<h4 id="idl-async-iterable-type" lt="async iterable" dfn export>Async iterable types — async iterable&lt;|T|&gt;</h4>

The <dfn lt="async iterable type" export>async iterable&lt;|T|&gt;</dfn> type is a parameterized
The <dfn lt="async iterable type" export>async iterable type</dfn> is a parameterized
type whose values are references to objects that can produce an asynchronously iterable, possibly infinite,
sequence of values of type |T|.

Expand Down Expand Up @@ -8202,26 +8202,20 @@ a [=struct=] with the following [=struct/items=]:
</div>

<div id="async-iterable-to-js" algorithm="convert an async iterable to a JavaScript value">
An IDL <a lt="async iterable type">async iterable&lt;<var ignore>T</var>&gt;</a> value |V| is
An IDL <a lt="async iterable">async iterable&lt;<var ignore>T</var>&gt;</a> value |V| is
[=converted to a JavaScript value|converted=] to a JavaScript object as follows:

1. Return |V|'s [=JS async iterable/object=].
</div>

<h5 id="js-async-iterator">Async iterators</h5>

<dfn lt="async iterator" export>Async iterator</dfn> values are represented by a [=struct=] with the following [=struct/items=]:

* <dfn for="JS async iterator">underlying record</dfn>, an [=Iterator=] record
* <dfn for="JS async iterator">type parameter</dfn>, an IDL type representing the type of values produced by the async iterator
<h5 id="js-async-iterator-iteration">Iterating async iterators</h5>

An [=async iterable=] is not directly iterated over. Instead, it is first opened to create
a [=async iterator=]. The [=async iterator=] can be asynchronously iterated over to produce values.

<h5 id="js-async-iterator-iteration">Iterating async iterators</h5>

[=Async iterables=] are not directly iterated over. They are first opened, to create a new
[=async iterator=], and then the [=async iterator=] is iterated over.
<dfn lt="async iterator" export>Async iterators</dfn> are [=structs=] with the following [=struct/items=]:
* <dfn for="JS async iterator">underlying record</dfn>, an [=Iterator=] record
* <dfn for="JS async iterator">type parameter</dfn>, an IDL type representing the type of values produced by the async iterator

<div algorithm>

Expand All @@ -8242,9 +8236,9 @@ a [=async iterator=]. The [=async iterator=] can be asynchronously iterated over
<div algorithm>

To <dfn id="async-iterator-get-next-value" export lt="get an async iterator next value">get the next value</dfn> of an
<code><a lt="async iterator">async iterator</a></code> |iterator|:
[=async iterator=] |iterator|:

1. Let |nextResult| be the result of calling
1. Let |nextResult| be
<a abstract-op>IteratorNext</a>(|iterator|'s [=JS async iterator/underlying record=]).
1. If |nextResult| is an abrupt completion, return [=a promise rejected with=]
|nextResult|.\[[Value]].
Expand All @@ -8268,7 +8262,7 @@ a [=async iterator=]. The [=async iterator=] can be asynchronously iterated over

To <dfn id="async-iterator-close" export lt="close an async iterator">close</dfn> an
<code><a lt="async iterator">async iterator&lt;<var ignore>T</var>&gt;</a></code> |iterator|,
with a reason |reason|, perform the following steps:
with a reason |reason|:

1. Let |iteratorRecord| be |iterator|'s [=JS async iterator/underlying record=].
1. Let |iteratorObj| be |iteratorRecord|.\[[Iterator]]
Expand Down

0 comments on commit 9a79b42

Please sign in to comment.