Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Emitter<T>

Event emitter.

Type parameters

  • T

Hierarchy

Index

Methods

Methods

off

  • off<U>(eventName: U, listener: Listener<T, U>): void
  • Unsubscribes from an event.

    Type parameters

    • U: Extract<keyof T, string>

    Parameters

    • eventName: U

      The event name.

    • listener: Listener<T, U>

      The event listener.

    Returns void

on

  • Subscribes for an event.

    Type parameters

    • U: Extract<keyof T, string>

    Parameters

    • eventName: U

      The event name.

    • listener: Listener<T, U>

      The event listener.

    Returns UnsubscribeFn

    The unsubscribe function.