Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Emitter<T>

Type Parameters

  • T = any

Hierarchy

Index

Constructors

Properties

_callbacks: undefined | CallbackList
_disposed: boolean = false
_event: Event<T>
_leakWarnCountdown: number = 0
_leakingStacks: undefined | Map<string, number>
LEAK_WARNING_THRESHHOLD: number = 175
_noop: (() => void) = ...

Type declaration

    • (): void
    • Returns void

Accessors

Methods

  • checkMaxListeners(maxListeners: number): undefined | (() => void)
  • dispose(): void
  • fire(event: T): any
  • popLeakingStack(stack: string): void
  • pushLeakingStack(): (() => void)
  • sequence(processor: ((listener: ((e: T) => any)) => MaybePromise<boolean>)): Promise<void>
  • Process each listener one by one. Return false to stop iterating over the listeners, true to continue.

    Parameters

    • processor: ((listener: ((e: T) => any)) => MaybePromise<boolean>)
        • Parameters

          • listener: ((e: T) => any)
              • (e: T): any
              • Parameters

                • e: T

                Returns any

          Returns MaybePromise<boolean>

    Returns Promise<void>