Skip to content

Use @readonly tag a lot more #7299

@Bertie690

Description

@Bertie690

Currently, while Phaser ostensibly has many properties that claim to "break things" if overwritten, its typing file still allows you to overwrite said properties at your leisure.

While legitimate use cases for overriding them do exist (ex: wrappers), I'd argue people able to pull that off successfully are knowledgeable enough to know about type assertions.

We should make these readonly to stop users from overwriting them and breaking their games.

I will not attempt to list every single property that should be made readonly in this manner, but notable ones include most of the Game/Scene systems objects.

Metadata

Metadata

Assignees

No one assigned

    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