Constructors
class ExplicitConstructor {
value: number,
constructor(value: number)
self.value = value
end
}
local exp: ExplicitConstructor = ExplicitConstructor(1)class ImplicitConstructor {
value: number,
implicit constructor(value: number)
self.value = value
end
}
local imp: ImplicitConstructor = 1Last updated