From b9b7daa73fa069d168d498baf4968e918315697d Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Tue, 17 Dec 2024 15:15:22 -0800 Subject: [PATCH] apply to nullable arguments as well --- README.md | 2 +- dist/index.d.ts | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1533be4..ebd919e 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ Most or all of these should be fixed in the generator over time. - `Array` changed to `Iterable` for WebIDL `sequence`s in argument positions (but not in return positions). - `any` changed to `object` for WebIDL `object`. - `| SharedArrayBuffer` added for `[AllowShared] BufferSource`. -- `| null` changed to `| null | undefined` for WebIDL `?` items in `sequence`s. +- `| null` changed to `| null | undefined` for WebIDL nullable items (`T?`). The following differences are TODO: should be changed in the final result. diff --git a/dist/index.d.ts b/dist/index.d.ts index cdceaba..93d113b 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -1730,7 +1730,10 @@ interface GPUBindingCommandsMixin { */ setBindGroup( index: GPUIndex32, - bindGroup: GPUBindGroup | null, + bindGroup: + | GPUBindGroup + | null + | undefined, dynamicOffsets?: Iterable ): undefined; /** @@ -1746,7 +1749,10 @@ interface GPUBindingCommandsMixin { */ setBindGroup( index: GPUIndex32, - bindGroup: GPUBindGroup | null, + bindGroup: + | GPUBindGroup + | null + | undefined, dynamicOffsetsData: Uint32Array, dynamicOffsetsDataStart: GPUSize64, dynamicOffsetsDataLength: GPUSize32 @@ -1824,7 +1830,10 @@ interface GPURenderCommandsMixin { */ setVertexBuffer( slot: GPUIndex32, - buffer: GPUBuffer | null, + buffer: + | GPUBuffer + | null + | undefined, offset?: GPUSize64, size?: GPUSize64 ): undefined;