types
types copied to clipboard
Consider two versions of types: one matching IDL exactly, and one that's stronger
(Long term probably)
The CTS needs the types to match IDL exactly, otherwise they can prevent us from writing tests for certain behavior.
Other projects may prefer stronger guarantees in cases where TypeScript can express something WebIDL cannot (e.g. disabling use of the constructor on GPUDevice, or perhaps allowing only one of the variants of GPUBindGroupLayoutEntry). There will be places we have to be careful not to be excessively strict, though (like allowing only tuples instead of arrays, or only GPUExtensionName instead of string, would be annoying).