-
Notifications
You must be signed in to change notification settings - Fork 201
Open
Labels
addition/proposalNew features or enhancementsNew features or enhancementsneeds implementer interestMoving the issue forward requires implementers to express interestMoving the issue forward requires implementers to express interest
Description
What problem are you trying to solve?
There is currently syntax to specify a default value empty sequence (= []) and a default value default dictionary (= {}), but no way to specify a default value empty record<K, V>.
This is needed to eliminate the invalid syntax used by WebGPU's GPUDeviceDescriptor, which tries to the default dictionary ( = {}) to default initialize the record<K, V> member requiredLimits:
dictionary GPUDeviceDescriptor
: GPUObjectDescriptorBase {
sequence<GPUFeatureName> requiredFeatures = [];
record<DOMString, (GPUSize64 or undefined)> requiredLimits = {};
GPUQueueDescriptor defaultQueue = {};
};(I have also filed gpuweb/gpuweb#5529 on WebGPU to remove the invalid syntax).
What solutions exist today?
Today, one can use prose for this.
How would you solve it?
Make either = [] or = {} valid for record<K, V>.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
addition/proposalNew features or enhancementsNew features or enhancementsneeds implementer interestMoving the issue forward requires implementers to express interestMoving the issue forward requires implementers to express interest