Skip to content

feat: add support for parsing async_sequence<T> type#775

Merged
saschanaz merged 11 commits into
w3c:mainfrom
lucacasonato:async_iterable_type
Jul 23, 2025
Merged

feat: add support for parsing async_sequence<T> type#775
saschanaz merged 11 commits into
w3c:mainfrom
lucacasonato:async_iterable_type

Conversation

@lucacasonato

Copy link
Copy Markdown
Contributor

Adds support for async iterable<T> (whatwg/webidl#1397).

Comment thread lib/productions/attribute.js Outdated
@lucacasonato
lucacasonato marked this pull request as ready for review January 24, 2025 13:12
@lucacasonato

Copy link
Copy Markdown
Contributor Author

This is now ready for review.

@saschanaz saschanaz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly fine, but I do not see the change corresponding to constants:

Async iterables must not be used as the type of an attribute or constant.

The Constant interface currently has no validate() but it'll be called automatically by Container when you add it.

@domenic

domenic commented Mar 12, 2025

Copy link
Copy Markdown

@lucacasonato, ping on updating in response to @saschanaz's comments so we can start propagating this through the spec ecosystem.

@saschanaz

Copy link
Copy Markdown
Member

Mostly fine, but I do not see the change corresponding to constants:

Async iterables must not be used as the type of an attribute or constant.

The Constant interface currently has no validate() but it'll be called automatically by Container when you add it.

I should probably do this myself...

Comment thread lib/productions/attribute.js Outdated

if (["sequence", "record"].includes(this.idlType.generic)) {
if (
["async iterable", "sequence", "record"].includes(this.idlType.generic)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per whatwg/webidl#1489 this PR should be updated.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And per #1500 it should be updated a little more, to use the token async_sequence instead.

@saschanaz saschanaz changed the title feat: add support for parsing async iterable<T> type feat: add support for parsing async_sequence<T> type Jul 23, 2025
@saschanaz
saschanaz merged commit 2d1eca8 into w3c:main Jul 23, 2025
4 checks passed
@saschanaz

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants