Re: [whatwg/webidl] Add `async iterable<T>` type to WebIDL (PR #1397)

@domfarolino commented on this pull request.



> +        1.  Let |done| be [=?=] <a abstract-op>IteratorComplete</a>(|iterResult|).
+        1.  If |done| is true:
+            1.  Return [=end of iteration=].
+        1.  Otherwise:
+            1.  Let |V| be [=?=] <a abstract-op>IteratorValue</a>(|iterResult|).
+            1.  Let |value| be the result of [=converted to an IDL value|converting=] |V| to an IDL
+                value of type |iterator|'s [=JS async iterator/type parameter=].
+            1.  Return |value|.
+
+</div>
+
+<div algorithm>
+
+    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|:

Maybe clarify that `|reason|` is a JavaScript value, like we do in https://webidl.spec.whatwg.org/#a-promise-rejected-with?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1397#pullrequestreview-2292648006
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/pull/1397/review/2292648006@github.com>

Received on Tuesday, 10 September 2024 14:07:43 UTC