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

Personally I would specify this by making `async iterable<T>` reject strings, and then adding `or USVString` to those places which should accept strings, just to ensure that future users of the type have actually decided to take strings on purpose instead of it happening by accident.

Plus if you take a string explicitly then you can use it directly instead of having to look up and invoke `String.prototype[Symbol.iterator]`, which is going to be... slower.

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

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

Received on Wednesday, 27 March 2024 02:37:04 UTC