Skip to content

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

Description

@kainino0x

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

Activity

  1. self-assigned this
    on Sep 12, 2020
  2. kainino0x commented on Feb 29, 2024

    @kainino0x
    CollaboratorAuthor

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

  3. changed the title [-]Make arrays (and tuples?) readonly[/-] [+]Make some/all input types readonly? (dict members, arrays, tuples)[/+] on Feb 29, 2024
  4. kainino0x commented on Feb 29, 2024

    @kainino0x
    CollaboratorAuthor

    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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions