types icon indicating copy to clipboard operation
types copied to clipboard

getPreferredCanvasFormat narrow types

Open ottoville opened this issue 2 years ago • 1 comments

Currently getPreferredCanvasFormat() returns "GPUTextureFormat". It should be stricter, to return union of string literals "rgba8unorm" | "bgra8unorm" https://gpuweb.github.io/gpuweb/#dom-gpu-getpreferredcanvasformat

ottoville avatar Jul 12 '23 14:07 ottoville

This would be great! Unfortunately it will have to be one of the manual diffs vs the generator, but that's fine. Would you like to open a PR? It'll be simple - document the diff in README.md (under "The following differences will remain."), edit dist/index.d.ts; the generated/ one will stay as is.

kainino0x avatar Jul 12 '23 17:07 kainino0x