[whatwg/webidl] `record<>` should allow the keytype to be a typedef that resolves to one of the allowed string types (Issue #1267)

Currently, in `record<K, V>`, K must be `DOMString`, `USVString`, or `ByteString`.  In CSSOM, we have a typedef for `CSSOMString` that resolves to *either* `DOMString` or `USVString` (with the choice of which typedef to use left up to the UA).

However, the current definition of `record` disallows us from writing `record<CSSOMString, V>`, despite the fact that in every impl the `CSSOMString` typedef is for a string type that would be valid in `record`.

So, `record` should allow the `K` type to be a typedef, so long as the inner type is one of the allowed string types.

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

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

Received on Monday, 13 February 2023 20:14:38 UTC