Skip to content

Class::Method

OOP

Method implementation. Emits function Class:Method(...).

void Class::Method(T arg) {
@field = arg;
}

None.

Per signature.

function Class:Method(arg: T)

this / @this is self. Bare fields become self.field. @janitor is self.janitor. Untagged files with only Class:: return the table (ModuleScript).

Construct one service in init() and use it from lambdas.

void LeaderstatsServer::OnPlayer(Player player) {
post(player.Name);
}

Emits:

function LeaderstatsServer:OnPlayer(player: Player)
print(player.Name)
end

struct · this · init · operator-method