Skip to content
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.

Is "sequence<File or Directory>" syntax correct/legal? #9

Closed
AFBarstow opened this issue Sep 8, 2015 · 2 comments
Closed

Is "sequence<File or Directory>" syntax correct/legal? #9

AFBarstow opened this issue Sep 8, 2015 · 2 comments

Comments

@AFBarstow
Copy link

The use cases imply the APIs needs to support a sequence of Files and/or Directory objects and the Web IDL syntax used is:

Promise<sequence<(File or Directory)>>

My take on Web IDL sequences is that they support a single type. As such, the above doesn't seem correct; perhaps a union or some type of abstract type (for File plus Directory objects) is needed?

@aliams
Copy link
Contributor

aliams commented Sep 8, 2015

From the Type definition, it appears that the syntax is correct:

[73] Type → SingleType | UnionType Null

Specifically, a Type can be a UnionType:

[75] UnionType → "(" UnionMemberType "or" UnionMemberType UnionMemberTypes ")"

@jwatt
Copy link
Contributor

jwatt commented Sep 21, 2015

It is correct. This issue can be closed.

@aliams aliams closed this as completed Sep 21, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants