types icon indicating copy to clipboard operation
types copied to clipboard

TypeScript type definitions for WebGPU https://gpuweb.github.io/types/

Results 21 types issues
Sort by recently updated
recently updated
newest added

A while back I wrote this document describing a potential project to fix a few bugs in the generator for WebGPU's TypeScript type definitions to make it more maintainable. I...

(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...

GPUObjectBase has `label: string | undefined` but to match the IDL it should be `label: string | null`.

This way if an application holds a readonly type it can pass it into WebGPU without having to cast it to writable.

Seems like TypeScript is adding some facilities for nicer nominal types: microsoft/TypeScript#33038 . Right now we do a "hack" (#11) using private void fields to make types unique.

Currently, all WebGPU types are added to the global ambients. The option to have them scoped as a module rather than global would be very helpful for me. Working on...

[GPUInternalError's](https://github.com/gpuweb/types/blob/main/generated/index.d.ts#L2281) `new` function / constructor is defined without a return type, so it defaults to `any`. Should this return type be the `GPUInternalError` interface instead? ```typescript interface GPUInternalError extends GPUError...

Accessing the properties of `size` in a `GPUTextureDescriptor` requires first casting it as a `GPUExtent3DDictStrict`: ``` const texture: GPUTextureDescriptor = { size: { width: 1, height: 2, depthOrArrayLayers: 2 },...

In TypeScript, by default, if you have an optional field like: `{ x?: number }` then it allows any of: `{ x: 5 }`, `{ x: undefined }`, `{}` There...

Does anyone have a working setup with vue3 + vite ?