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

Always return an array for idlType, etc. #113

Closed
marcoscaceres opened this issue Nov 5, 2017 · 6 comments
Closed

Always return an array for idlType, etc. #113

marcoscaceres opened this issue Nov 5, 2017 · 6 comments

Comments

@marcoscaceres
Copy link
Member

When accessing properties in the parsed IDL structures, we need to make sure we don't constantly swap object types (from object to array, for instance). For example, setlike should have an array with one item.

@saschanaz
Copy link
Member

Shouldn't it be okay to keep the current setlike behavior, as it will never get a second item?

@marcoscaceres
Copy link
Member Author

It means special type handling :( One item is just an array with one item.

@saschanaz
Copy link
Member

I agree with type: "iterable" because it's a pain to distinguish one-itemed and two-itemed iterables, not sure with type: "setlike" as it already has a different type name?

@saschanaz
Copy link
Member

I think it makes sense if we want to process all those iterable friends in the same way, although the names.

@saschanaz
Copy link
Member

I intentionally didn't close this, are there any remaining type inconsistency?

@marcoscaceres
Copy link
Member Author

I can't see any others, if this covers the ones documented (iterable, sets, maps, and legacyiterable).

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

No branches or pull requests

2 participants