Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 439 Bytes

local-event.decorator.md

File metadata and controls

24 lines (19 loc) · 439 Bytes

#Local event decorator

The examples bellow are the same

class T {
  constructor() {
    on('event', this.eventHandler.bind(this))
  }

  private eventHandler(...args: unknown[]): void {}
}
import { Controller } from "./controller.decorator";
import { LocalEvent } from "./local-event.decorator";

@Controller('T')
class T {
  @LocalEvent('event')
  private eventHandler(...args: unknown[]): void {}
}