- From: Anne van Kesteren <notifications@github.com>
- Date: Wed, 11 Nov 2026 06:49:24 -0800
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 11 November 2026 14:49:28 UTC
@annevk commented on this pull request.
> @@ -8670,7 +8670,7 @@ IDL [=promise type=] values are represented by JavaScript [=PromiseCapability=]
To <dfn export>resolve</dfn> a <code><a interface>Promise</a><|T|></code> |p| with |x| (a
value of type |T|), perform the following steps:
- 1. If |x| is not given, then let it be the {{undefined}} value.
+ 1. If |x| is not given, then let |x| be the {{undefined}} value.
I think what we want to do is to define **resolve** as having an optional argument |x| that defaults to undefined. See https://infra.spec.whatwg.org/#algorithm-params for how to go about this.
We can then remove this step.
The one tricky thing is how to deal with type |T|. Maybe something like this:
> To resolve a `Promise<T>` _p_, optionally with a value of type _T_ _value_:
I don't really like "_T_ _value_" but it's hopefully clear enough.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1674#pullrequestreview-5860565670
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/webidl/pull/1674/review/5860565670@github.com>
Received on Wednesday, 11 November 2026 14:49:28 UTC