Closed al1-ce closed 1 month ago
So, still, what'd be syntax difference between calls that pass this and ones that do not? For example if I'd use external library there's some functions that do obj:method()
and others obj.func()
. How should I make it generate one or the other?
It's hard to take care of both, so when you want obj.func()
, you write const {func: obj_func}=obj
first and then obj_func()
I guess that would work, kinda would be like bindings in other languages which is possible to generate
I was thinking about it and what about being able to define non-class symbols? Code has to go through cli anyway so something like js2lua --non-class=api,other,thing file.js > file.lua
would possibly work
I add an option useColonOnMethod
, done by b78d0aad41ec9ed8903e274089bdad1e0acaaa7e
It'd be easier to explain in example:
Would generate:
My question is - is there a way to get output of
a.f()
without prependingnew
?