getPreferredCanvasFormat narrow types
ottoville opened this issue · 1 comments
ottoville commented
Currently getPreferredCanvasFormat() returns "GPUTextureFormat".
It should be stricter, to return union of string literals "rgba8unorm" | "bgra8unorm"
https://gpuweb.github.io/gpuweb/#dom-gpu-getpreferredcanvasformat
kainino0x commented
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.