Closed MattiasBuelens closed 4 years ago
The WebIDL specification has recently been extended with async iterable declarations on interfaces:
interface interface_identifier { async iterable<value_type>; async iterable<value_type>(/* arguments... */); async iterable<key_type, value_type>; async iterable<key_type, value_type>(/* arguments... */); };
Currently, the streams specification is using this in its ReadableStream definition:
ReadableStream
[Exposed=(Window,Worker,Worklet)] interface ReadableStream { // ... async iterable<any>(optional ReadableStreamIteratorOptions options = {}); };
This PR adds support for parsing such declarations, and adds the current streams WebIDL definitions as a test case.
Thanks! I think though it might be best to not combine the keywords into async iterable, could two keywords be parsed instead?
async iterable
👍
The WebIDL specification has recently been extended with async iterable declarations on interfaces:
Currently, the streams specification is using this in its
ReadableStream
definition:This PR adds support for parsing such declarations, and adds the current streams WebIDL definitions as a test case.