Re: [whatwg/webidl] Spec should be clearer than a `Promise<T>` argument also accepts `T` objects (Issue #1494)

tabatkins left a comment (whatwg/webidl#1494)

Ah thanks, yeah, `react to a promise` works fine for ensuring you actually get a T out (anything else will either convert to a T via the standard rules, or throw an error, and I don't believe spec text needs to handle errors explicitly; it'll get auto-caught by the IDL machinery and cause a rejected promise).

So yeah, it's just the fact that `T` can be passed to a `promise<T>` argument that should be spelled out (in a note).

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

Message ID: <whatwg/webidl/issues/1494/2971925549@github.com>

Received on Friday, 13 June 2025 23:08:43 UTC