[heycam/webidl] record with arbitrary value types as keys? (#509)

The definition for `record<K, V>` says:

> K must be one of DOMString, USVString, or ByteString

It would be useful to be able to use `enum` for key types, which are essentially strings.
I hit the problem that this is not possible in https://github.com/w3c/webrtc-stats/issues/281.

In https://github.com/w3c/webrtc-stats/issues/133 it would also be useful if the key could be integers.

Why is `K` restricted this way? If not any `K`, how about any `K` that is by-value?

-- 
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/509

Received on Wednesday, 10 January 2018 14:29:52 UTC