Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Emitter<T>

Type parameters

  • T

Hierarchy

Index

Constructors

constructor

Properties

Protected _callbacks

_callbacks: CallbackList | undefined

Private _disposed

_disposed: boolean = false

Private _event

_event: Event<T>

Private _leakWarnCountdown

_leakWarnCountdown: number = 0

Private _leakingStacks

_leakingStacks: Map<string, number> | undefined

Private Optional _options

_options: EmitterOptions

Static Private LEAK_WARNING_THRESHHOLD

LEAK_WARNING_THRESHHOLD: number = 175

Accessors

event

Methods

Protected checkMaxListeners

  • checkMaxListeners(maxListeners: number): (() => void) | undefined

dispose

  • dispose(): void

fire

  • fire(event: T): any

Protected popLeakingStack

  • popLeakingStack(stack: string): void

Protected pushLeakingStack

  • pushLeakingStack(): () => void

sequence

  • 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>

Static Private _noop

  • _noop(): void