Closed a-sully closed 5 months ago
Note that per WebIDL:
Since
FrozenArray<T>
values are references, they are unlike sequence types, which are lists of values that are passed by value.
This is relevant for any spec text that operates on descriptor.dimensions as if it's a by-value list. My gut feeling is that most specs treat FrozenArray<T>
the same as sequence<T>
except that Object.freeze()
will be applied at the point where a value is returned to script, but there may be more subtlety than that.
The WebIDL spec is considering removing support for FrozenArray<T>
as a dictionary member type: https://github.com/whatwg/webidl/issues/1399
We should share our use case in that issue if we feel this change is important for this API.
Ah, thanks for the pointer. I don't think there are specific reasons why this API needs to use FrozenArray
. The arguments laid out in that issue apply here, so if FrozenArray
is to be removed then I think we should WontFix this issue
Here's the guidance from WebIDL which applies to
MLOperandDescriptor.dimensions
:This is relevant to the discussion in #666 about providing a getter to return an
MLOperandDescriptor