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

[SameObject]/[NewObject] should be allowed on unions and other objects #1077

Open
kainino0x opened this issue Dec 16, 2021 · 0 comments
Open

Comments

@kainino0x
Copy link

This is extracted from #71 which discusses extending [SameObject]/[NewObject] to types other than Promises:

It should be allowed if the return value is any object type. Specifically, any interface type, "object", a promise, an Error, a DOMException, any buffer source type, or a union of types on which [NewObject] is allowed.

WebGPU in particular wants to use this on a readonly attribute with a union type. gpuweb/gpuweb#1225

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

No branches or pull requests

1 participant