-
-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Description
TS allows you to explicitly type 'this' in function declarations, but it's just a typing hint that should be stripped on compilation. Currently, it is still added to the output declaration:
class Foo {
public method(this: Foo, s: string): string { return "foo" + s; }
}=>
Foo = Foo or {}
Foo.__index = Foo
function Foo.new(construct, ...)
local self = setmetatable({}, Foo)
if construct and Foo.constructor then Foo.constructor(self, ...) end
return self
end
function Foo.constructor(self)
end
function Foo.method(self,this,s) --this is going to be a problem
return "foo" .. s
endReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels