Re: [heycam/webidl] Need pattern for feature detecting dictionary members (#107)

https://github.com/heycam/webidl/issues/107#issuecomment-917854587 makes sense to me, and still I'd prefer a general solution for automation purpose e.g. BCD mentioned above.

My second random thought, which also covers signature and argument support detection:

```webidl
// Given this IDL:
interface Bar {
  foo(Bar bar);
  foo((boolean or DOMString) union);
  foo(float f, unsigned short s);
};

dictionary Bar {
  DOMString bar;
};
```

```js
Foo.prototype.foo[Symbol.inspect];
inspectSignature(Foo.prototype.foo);
// returns:
// [
//   { bar: String },
//   [[Boolean, String]],
//   [Number, Number]
// ]
```

(Not sure how to differentiate optional arguments though.)

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

Received on Tuesday, 14 September 2021 22:16:36 UTC