Hmmm what if we can do OOP on TypeScript and receive pure code on Lua?)))))
Example:
TS code:
const [x,y,z] = player.getPosition();
Lua code after compilation:
local x,y,z = getPlayerPosition(player)
I cannot imagine now how to implement this, but, anyway, what do you think about this idea?
Suggested by @Dezash