When you expose a JavaScript object such as a class instance as a Lua object, it gets Proxied. This is good, I like it!
The only problem is that the resulting Lua Proxy does not respect private/protected/readonly sorts of TypeScript access types. Which, of course, it cannot, since JavaScript is unaware of those things.
That being the case, another approach is needed in order to protect methods and traits. Possibly a prefix mask like _ or h or something which Proxy could filter out when creating __index?
When you expose a JavaScript object such as a class instance as a Lua object, it gets Proxied. This is good, I like it!
The only problem is that the resulting Lua Proxy does not respect private/protected/readonly sorts of TypeScript access types. Which, of course, it cannot, since JavaScript is unaware of those things.
That being the case, another approach is needed in order to protect methods and traits. Possibly a prefix mask like _ or h or something which Proxy could filter out when creating __index?