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.
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
readonlyto stop users from overwriting them and breaking their games.I will not attempt to list every single property that should be made
readonlyin this manner, but notable ones include most of the Game/Scene systems objects.