Closed aSemy closed 2 years ago
This could be possible since typescript 4.3 with setter overloading. Certain other attributes already have setter overloading (defined manually), but this could be done automatically in these cases too (stay tuned)!
Now implemented in v0.15.0: table or array types, whenever known to be in a "read" position, are declared in Table form.
For more details, see the Changelog/Readme.
Thanks for this change - it's much nicer to use now!
One small note: I think BoundingBoxTable
and BoundingBoxArray
also needs the left_top
and right_bottom
fields marked as PositionTable
instead of Position
.
One small note: I think
BoundingBoxTable
andBoundingBoxArray
also needs theleft_top
andright_bottom
fields marked asPositionTable
instead ofPosition
.
See BoundingBoxRead
for those situations. A BoundingBox specification can still be either table or array.
That helps, thanks!
I have a
LuaPlayer
variable, and I'd like to access the rgba fields ofplayer.color
. However I'm unable to do this - the fields are not resolvable.I'm sure there's an easy way to do this, I'm just not familiar enough with TypeScript to figure it out :) But it would be nice to be able to access the rgba fields without having to determine whether
player.color
is aColorTable
or aColorArray
If an improvement is possible, I think
ColorModifier
,Position
,ChunkPosition
,TilePosition
,BoundingBox
, andGuiLocation
, would also benefit from the same improvement.