Skip to content

Commit e1d4a24

Browse files
committed
fixup! Add async_iterable support
1 parent 9393044 commit e1d4a24

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

index.bs

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4160,6 +4160,10 @@ iteration – or a tuple with three elements:
41604160
1. a value of the second type given in the declaration;
41614161
1. an opaque value that is passed back to the next invocation of the algorithm,
41624162

4163+
The prose may also define <dfn>asynchronous iterator initialization steps</dfn> for the
4164+
[=interface=] with an [=asynchronously iterable declaration=], which would then be called with the
4165+
newly created iterator object.
4166+
41634167
[=Interfaces=] with an [=asynchronously iterable declaration=] must not have any
41644168
[=interface members=] named "<code>entries</code>", "<code>keys</code>", or "<code>values</code>",
41654169
or have any [=inherited interfaces=] that have [=interface members=] with these names.
@@ -11667,7 +11671,10 @@ The location of the property is determined as follows:
1166711671
1. If |object| does not [=implement=] |interface|, then [=ECMAScript/throw=] a
1166811672
{{ECMAScript/TypeError}}.
1166911673
1. Let |iterator| be a newly created [=default asynchronous iterator object=] for |interface|
11670-
with |object| as its target and iterator kind "<code>key+value</code>".
11674+
with |object| as its [=default asynchronous iterator object/target=] and
11675+
"<code>key+value</code>" as its [=default asynchronous iterator object/kind=].
11676+
1. Run the [=asynchronous iterator initialization steps=] for |interface| with |iterator|, if
11677+
any.
1167111678
1. Return |iterator|.
1167211679
</div>
1167311680

@@ -11856,7 +11863,10 @@ then the [=function object=] is {{%ArrayProto_keys%}}.
1185611863
1. If |object| does not [=implement=] |interface|, then [=ECMAScript/throw=] a
1185711864
{{ECMAScript/TypeError}}.
1185811865
1. Let |iterator| be a newly created [=default asynchronous iterator object=] for |interface|
11859-
with |object| as its target and iterator kind "<code>key</code>".
11866+
with |object| as its [=default asynchronous iterator object/target=] and
11867+
"<code>key</code>" as its [=default asynchronous iterator object/kind=].
11868+
1. Run the [=asynchronous iterator initialization steps=] for |interface| with |iterator|, if
11869+
any.
1186011870
1. Return |iterator|.
1186111871
</div>
1186211872

@@ -11917,7 +11927,10 @@ the value of the {{@@iterator}} property.
1191711927
1. If |object| does not [=implement=] |interface|, then [=ECMAScript/throw=] a
1191811928
{{ECMAScript/TypeError}}.
1191911929
1. Let |iterator| be a newly created [=default asynchronous iterator object=] for |interface|
11920-
with |object| as its target and iterator kind "<code>value</code>".
11930+
with |object| as its [=default asynchronous iterator object/target=] and
11931+
"<code>value</code>" as its [=default asynchronous iterator object/kind=].
11932+
1. Run the [=asynchronous iterator initialization steps=] for |interface| with |iterator|, if
11933+
any.
1192111934
1. Return |iterator|.
1192211935
</div>
1192311936

@@ -12152,6 +12165,8 @@ The \[[Prototype]] [=internal slot=] of an [=asynchronous iterator prototype obj
1215212165
1. Return |object|'s [=default asynchronous iterator object/ongoing promise=].
1215312166
</div>
1215412167

12168+
Issue: <code>return</code>; <code>throw</code> methods?
12169+
1215512170
The [=class string=] of an [=asynchronous iterator prototype object=] for a given [=interface=] is
1215612171
the result of concatenating the [=identifier=] of the [=interface=] and the string
1215712172
"<code> AsyncIterator</code>".

0 commit comments

Comments
 (0)