Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Emitter<Events, Key>

Type parameters

  • Events

  • Key: keyof Events

Hierarchy

Implemented by

Index

Methods

emit

  • emit<K>(event: K, value: Events[K]): void

emitCallback

  • emitCallback<K>(event: K): function
  • Type parameters

    • K: Key

    Parameters

    • event: K

    Returns function

      • (value: Events[K]): void
      • Parameters

        • value: Events[K]

        Returns void

off

  • off(event: Key): void

on

once

take

  • take<K>(event: K): Promise<Events[K]>

takeEither

  • takeEither<Success, Failure>(success: Success, failure: Failure): Promise<Events[Success]>
  • Type parameters

    • Success: Key

    • Failure: Key

    Parameters

    • success: Success
    • failure: Failure

    Returns Promise<Events[Success]>

takeTimeout

  • takeTimeout<K>(event: K, timeout: number): Promise<Events[K]>

Generated using TypeDoc