[whatwg/webidl] draft: Interaction with the Stage 2 Record & Tuple proposal for ECMAScript (PR #1184)

Hello, this draft PR is a prototype spec text that attempts to define a minimal interaction between the [Record & Tuple proposal for ECMAScript](https://github.com/tc39/proposal-record-tuple) and WebIDL. The proposal is currently at Stage 2 **so there is no intent to merge this PR at the moment** but the goal is to open a conversation for our approach here.

In this PR, we want to keep things minimal: we do not intend just yet to add Record & Tuple to WebIDL types, we are only defining a conversion algorithm when records are put in place of objects (option bags notably) and when tuples are similarly put in place of arrays...

If the need arises later to have an API defined with WebIDL that return a Record or a Tuple for instance, then more work would be needed...


- [ ] At least two implementers are interested (and none opposed):
   * …
   * …
- [ ] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
   * …
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
   * Chrome: …
   * Firefox: …
   * Safari: …
   * Deno: …
   * Node.js: …
   * webidl2.js: …
   * widlparser: …

(See [WHATWG Working Mode: Changes](https://whatwg.org/working-mode#changes) for more details.)

You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/webidl/pull/1184


-- Commit Summary --

  * wip: describe record to dictionary conversion
  * wip: attempt to make tuples into sequences
  * remove nested call to ToObject
  * hoist ToObject out of the loop
  * remove unneeded ToObject

-- File Changes --

    M index.bs (15)

-- Patch Links --

https://github.com/whatwg/webidl/pull/1184.patch

https://github.com/whatwg/webidl/pull/1184.diff


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1184

You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/pull/1184@github.com>

Received on Tuesday, 23 August 2022 13:17:01 UTC