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

@lucacasonato commented on this pull request.



> +
+* <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
+
+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.
+
+<div algorithm>
+
+    To <dfn id="async-iterable-open" export lt="open an async iterable">open</dfn> an
+    <code><a lt="async iterable type">async iterable&lt;<var>T</var>&gt;</a></code> |iterable|:

Yes, promises seems to use the instance, not the type. I changed it.

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

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

Received on Friday, 2 August 2024 12:49:35 UTC