Skip to content
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

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lucacasonato
Copy link
Contributor

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

@@ -75,7 +75,9 @@ export class Attribute extends Base {
yield* this.extAttrs.validate(defs);
yield* this.idlType.validate(defs);

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

Choose a reason for hiding this comment

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

It indeed doesn't make sense but the spec PR does not fix https://whatpr.org/webidl/1397/402a886...0402e85.html#idl-attributes "The type of the attribute ..." part.

Copy link
Contributor Author

@lucacasonato lucacasonato Mar 26, 2024

Choose a reason for hiding this comment

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

The spec PR disallows it outright in any "return to JS position" because it does not define IDL->JS conversion (only JS->IDL).

Should I make this more clear?

Copy link
Member

Choose a reason for hiding this comment

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

I'd say yes as sequence being attribute is disallowed multiple times in the spec (at the attribute definition and also at the sequence definition).

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.

2 participants