Re: [ServiceWorker] Response or Promise<Response> is invalid Web IDL (#724)

The fact that promises don't appear in the distinguishability table is a bug, imo. // cc @heycam

That said, per spec you can in fact just write `Promise<Response>` and an incoming `Response` will get wrapped in a `Promise` via `Promise.resolve`.  The only reason you'd want to use the union is if you actually wanted different processing of some sort in the `Promise` and non-`Promise` cases.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/724#issuecomment-124560440

Received on Friday, 24 July 2015 15:35:36 UTC