Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getPreferredCanvasFormat narrow types #132

Open
ottoville opened this issue Jul 12, 2023 · 1 comment
Open

getPreferredCanvasFormat narrow types #132

ottoville opened this issue Jul 12, 2023 · 1 comment

Comments

@ottoville
Copy link
Contributor

ottoville commented Jul 12, 2023

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
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants