Options
All
  • Public
  • Public/Protected
  • All
Menu

The IEventSlot interface represents an event with custom parameters. Multiple listeners can be added/removed to/from an event.

Type parameters

  • TFunc: Function = Function

Hierarchy

Index

Methods

attach

  • attach(listener: TFunc): void
  • Adds the given function as a listener to the event. Note that this cannot be a lambda function because there will be no way to remove a lambda function listener later.

    Parameters

    • listener: TFunc

    Returns void

detach

  • detach(listener: TFunc): void
  • Removes the given function as a listener to the event.

    Parameters

    • listener: TFunc

    Returns void

has

  • has(): boolean
  • Determines whether this event slot has any listeners.

    Returns boolean