Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add
async iterable<T>
type to WebIDL #1397base: main
Are you sure you want to change the base?
Add
async iterable<T>
type to WebIDL #1397Changes from 17 commits
14f1bdb
b7df167
0402e85
b6f7392
6363f6c
5533589
6559e06
3789832
6f284c1
dcbe738
bd86c51
f97033b
30fb12d
3469138
947fb78
118b446
ca5967b
11f9a9f
dc07972
dd56f97
9a79b42
6374863
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to match how other parameterizable types are defined. I'd expect just "async iterable" as the dfn text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That
dfn
is on the heading. I copied this from sequence. It has two dfn:sequence
in the headingsequence type
in the bodyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems pretty confusing. What type to the created values have, then?
I think this whole section is JS language binding specific, since it relates to algorithms like "open" and "get the next value" which are only defined for the JS language binding. So maybe we can remove this confusing not-a-type from the Web IDL "Types" section (2.13), and make it something produced and consumed by those algorithms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved it down to the JS language section, and added some other wording up here to express that IDL async iterables are themselves not being iterated over, but produce a value that is being iterated over (without referencing
[=async iterator=]
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly I think we can formally define this as a struct that contains "type parameter" and "record" fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. However I had to change
record
tounderlying record
because otherwise multiple[=record=]
(referring to the IDL type) that would emit link errors because multiple possible dfns ofrecord
existed (even if one of them was namespaced toasync iterator
). I couldn't figure out how to forciably link[=record=]
to the IDL type.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All references of "abrupt completion" in the current standard link to the ES term. Could we do that too here?