Re: [whatwg/webidl] Seeking clarification on whether unioning promises and callbacks is allowed (Issue #1278)

Promises are [indistinguishable](https://webidl.spec.whatwg.org/#example-distinguishability-promises) and thus cannot be members of unions. This follows from the fact that e.g. `3` is a valid ECMAScript input for `Promise<byte>` — it’s like `await 3` or `Promise.resolve(3)`.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/issues/1278#issuecomment-1461691793
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/issues/1278/1461691793@github.com>

Received on Thursday, 9 March 2023 09:53:50 UTC