Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 453 Bytes

net-event.decorator.md

File metadata and controls

26 lines (20 loc) · 453 Bytes

#Net event decorator

The examples bellow are the same

class T {
  constructor() {
    onNet('netEvent', this.netEventHandler.bind(this))
  }

  private netEventHandler(...args: unknown[]): void {

  }
}
import { Controller } from "./controller.decorator";
import { NetEvent } from "./net-event.decorator";

@Controller('T')
class T {
  @NetEvent('netEvent')
  private netEventHandler(...args: unknown[]): void {}
}