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

Thanks for the comments @domenic and @bakkot. I agree strongly with @bakkot that in the Web IDL type, we should only allow objects implementing the async iterable protocol for the `async iterable<T>` type. Anything else would be a significant hassle with a high chance for unexpected behaviour when plumbed into the overload / union resolution algorithm. Also there is already precedent in Web IDL that iterable taking types do not support iterating string (`sequence<T>` does not support iterating strings, but does iterate objects implementing the iterable protocol).

For the streams specific discussion, lets move it right here: https://github.com/whatwg/streams/pull/1310#issuecomment-2022484496

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

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

Received on Wednesday, 27 March 2024 11:04:04 UTC