diff --git a/generated/index.d.ts b/generated/index.d.ts index 08b02d36..bfb6aa6a 100644 --- a/generated/index.d.ts +++ b/generated/index.d.ts @@ -10,7 +10,7 @@ type GPUBufferUsageFlags = number; type GPUColor = - | Array + | Iterable | GPUColorDict; type GPUColorWriteFlags = number; @@ -27,7 +27,7 @@ type GPUDepthBias = number; type GPUExtent3D = - | Array + | Iterable | GPUExtent3DDict; type GPUFlagsConstant = number; @@ -41,11 +41,11 @@ type GPUMapModeFlags = number; type GPUOrigin2D = - | Array + | Iterable | GPUOrigin2DDict; type GPUOrigin3D = - | Array + | Iterable | GPUOrigin3DDict; type GPUPipelineConstantValue = number; @@ -409,7 +409,7 @@ interface GPUBindGroupDescriptor * A list of entries describing the resources to expose to the shader for each binding * described by the {@link GPUBindGroupDescriptor#layout}. */ - entries: Array; + entries: Iterable; } interface GPUBindGroupEntry { @@ -431,7 +431,7 @@ interface GPUBindGroupLayoutDescriptor /** * A list of entries describing the shader resource bindings for a bind group. */ - entries: Array; + entries: Iterable; } interface GPUBindGroupLayoutEntry { @@ -594,7 +594,7 @@ interface GPUCanvasConfiguration { * The formats that views created from textures returned by * {@link GPUCanvasContext#getCurrentTexture} may use. */ - viewFormats?: Array; + viewFormats?: Iterable; /** * The color space that values written into textures returned by * {@link GPUCanvasContext#getCurrentTexture} should be displayed with. @@ -796,7 +796,7 @@ interface GPUDeviceDescriptor * Exactly the specified set of features, and no more or less, will be allowed in validation * of API calls on the resulting device. */ - requiredFeatures?: Array; + requiredFeatures?: Iterable; /** * Specifies the limits that are required by the device request. * The request will fail if the adapter cannot provide these limits. @@ -861,7 +861,11 @@ interface GPUFragmentState * A list of {@link GPUColorTargetState} defining the formats and behaviors of the color targets * this pipeline writes to. */ - targets: Array; + targets: Iterable< + | GPUColorTargetState + | null + | undefined + >; } interface GPUMultisampleState { @@ -925,7 +929,11 @@ interface GPUPipelineLayoutDescriptor * to a @group attribute in the {@link GPUShaderModule}, with the `N`th element corresponding * with `@group(N)`. */ - bindGroupLayouts: Array; + bindGroupLayouts: Iterable< + | GPUBindGroupLayout + | null + | undefined + >; } interface GPUPrimitiveState { @@ -1178,7 +1186,11 @@ interface GPURenderPassDescriptor * Due to compatible usage list|usage compatibility, no color attachment * may alias another attachment or any resource used inside the render pass. */ - colorAttachments: Array; + colorAttachments: Iterable< + | GPURenderPassColorAttachment + | null + | undefined + >; /** * The {@link GPURenderPassDepthStencilAttachment} value that defines the depth/stencil * attachment that will be output to and tested against when executing this render pass. @@ -1207,7 +1219,11 @@ interface GPURenderPassLayout /** * A list of the {@link GPUTextureFormat}s of the color attachments for this pass or bundle. */ - colorFormats: Array; + colorFormats: Iterable< + | GPUTextureFormat + | null + | undefined + >; /** * The {@link GPUTextureFormat} of the depth/stencil attachment for this pass or bundle. */ @@ -1389,7 +1405,7 @@ interface GPUShaderModuleDescriptor * errors (like unknown entry point names or incompatible pipeline layouts) to developers, * for example in the browser developer console. */ - compilationHints?: Array; + compilationHints?: Iterable; } interface GPUStencilFaceState { @@ -1549,7 +1565,7 @@ interface GPUTextureDescriptor * - `format` and `viewFormat` differ only in whether they are `srgb` formats (have the `-srgb` suffix). * */ - viewFormats?: Array; + viewFormats?: Iterable; } interface GPUTextureViewDescriptor @@ -1630,7 +1646,7 @@ interface GPUVertexBufferLayout { /** * An array defining the layout of the vertex attributes within each element. */ - attributes: Array; + attributes: Iterable; } interface GPUVertexState @@ -1639,7 +1655,11 @@ interface GPUVertexState * A list of {@link GPUVertexBufferLayout}s, each defining the layout of vertex attribute data in a * vertex buffer used by this pipeline. */ - buffers?: Array; + buffers?: Iterable< + | GPUVertexBufferLayout + | null + | undefined + >; } interface GPUBindingCommandsMixin { @@ -1648,12 +1668,18 @@ interface GPUBindingCommandsMixin { */ setBindGroup( index: GPUIndex32, - bindGroup: GPUBindGroup | null, - dynamicOffsets?: Array + bindGroup: + | GPUBindGroup + | null + | undefined, + dynamicOffsets?: Iterable ): undefined; setBindGroup( index: GPUIndex32, - bindGroup: GPUBindGroup | null, + bindGroup: + | GPUBindGroup + | null + | undefined, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32 @@ -1731,7 +1757,10 @@ interface GPURenderCommandsMixin { */ setVertexBuffer( slot: GPUIndex32, - buffer: GPUBuffer | null, + buffer: + | GPUBuffer + | null + | undefined, offset?: GPUSize64, size?: GPUSize64 ): undefined; @@ -2404,7 +2433,9 @@ interface GPUPipelineError declare var GPUPipelineError: { prototype: GPUPipelineError; new ( - message?: string, + message: + | string + | undefined, options: GPUPipelineErrorInit ): GPUPipelineError; }; @@ -2447,7 +2478,7 @@ interface GPUQueue * `commandBuffers`: */ submit( - commandBuffers: Array + commandBuffers: Iterable ): undefined; onSubmittedWorkDone(): Promise; /** @@ -2617,7 +2648,7 @@ interface GPURenderPassEncoder * @param bundles - List of render bundles to execute. */ executeBundles( - bundles: Array + bundles: Iterable ): undefined; /** * Completes recording of the render pass commands sequence. diff --git a/package-lock.json b/package-lock.json index 8ca30457..666da1e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -771,7 +771,8 @@ }, "node_modules/webidl2ts": { "version": "1.0.4", - "resolved": "git+ssh://git@github.com/toji/webidl2ts.git#d6d7e68a0e59e2c716b058ea437f7f49958a0e56", + "resolved": "git+ssh://git@github.com/toji/webidl2ts.git#9596655fbb3fd6147e1990304c7aa7b84ae0b71b", + "integrity": "sha512-Q4p/X615ifVpjPd9uQ2wrGAgQBAORZrTWRqG9ccsscpezWc76NHMpi2kIc8L1pQjLoRtJ+suY9/RFV1bmudRsQ==", "dev": true, "license": "MIT", "dependencies": { @@ -914,7 +915,7 @@ "dependencies": { "typescript": "=4.2.4", "webidl2": "^24.2.0", - "webidl2ts": "github:toji/webidl2ts", + "webidl2ts": "github:toji/webidl2ts#9596655fbb3fd6147e1990304c7aa7b84ae0b71b", "yargs": "^16.2.0" }, "bin": { @@ -1000,7 +1001,7 @@ "requires": { "typescript": "=4.2.4", "webidl2": "^24.2.0", - "webidl2ts": "github:toji/webidl2ts", + "webidl2ts": "github:toji/webidl2ts#9596655fbb3fd6147e1990304c7aa7b84ae0b71b", "yargs": "^16.2.0" } }, @@ -1511,9 +1512,10 @@ "dev": true }, "webidl2ts": { - "version": "git+ssh://git@github.com/toji/webidl2ts.git#d6d7e68a0e59e2c716b058ea437f7f49958a0e56", + "version": "git+ssh://git@github.com/toji/webidl2ts.git#9596655fbb3fd6147e1990304c7aa7b84ae0b71b", + "integrity": "sha512-Q4p/X615ifVpjPd9uQ2wrGAgQBAORZrTWRqG9ccsscpezWc76NHMpi2kIc8L1pQjLoRtJ+suY9/RFV1bmudRsQ==", "dev": true, - "from": "webidl2ts@github:toji/webidl2ts", + "from": "webidl2ts@github:toji/webidl2ts#9596655fbb3fd6147e1990304c7aa7b84ae0b71b", "requires": { "jsdom": "^16.4.0", "typescript": "^4.2.2", diff --git a/third_party/bikeshed-to-ts b/third_party/bikeshed-to-ts index 160d9419..f63a03d3 160000 --- a/third_party/bikeshed-to-ts +++ b/third_party/bikeshed-to-ts @@ -1 +1 @@ -Subproject commit 160d9419a6e7441a0eb8060be8c5d64b04cc9706 +Subproject commit f63a03d3842637091508c95365dae67f4a74862d