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

Make some/all input types readonly? (dict members, arrays, tuples) #29

Open
kainino0x opened this issue Sep 12, 2020 · 2 comments
Open
Assignees

Comments

@kainino0x
Copy link
Collaborator

kainino0x commented Sep 12, 2020

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

@kainino0x kainino0x self-assigned this Sep 12, 2020
@kainino0x
Copy link
Collaborator Author

Looking at this again, realizing it should apply to all of the dictionary members too, not just arrays.

@kainino0x kainino0x changed the title Make arrays (and tuples?) readonly Make some/all input types readonly? (dict members, arrays, tuples) Feb 29, 2024
@kainino0x
Copy link
Collaborator Author

In practice this is not very much of a problem because TypeScript is extremely lax about readonly enforcement and allows implicit conversion from readonly to writable in a lot of cases. I'm not even aware of warnings or lint options that make it stricter.

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

1 participant