Provides buffered event emitting semantics, similar to many Node-style streams. Subclasses will override EventEmitter.on() and trigger uncorking. NOTE: It is HIGHLY recommended that uncorking should always be done via process.nextTick(), not during the EventEmitter.on() call.

See also: Node writable streams

Hierarchy

  • EventEmitter
    • BufferedEventEmitter

Constructors

Methods

Constructors

Methods

  • Forces all written events to be buffered in memory. The buffered data will be flushed when uncork is called.

    Returns void

  • Synchronously calls each of the listeners registered for the event key supplied in registration order. If the BufferedEventEmitter is currently corked, the event will be buffered until uncork is called.

    Parameters

    • event: EventKey

      The name of the event

    • Rest ...args: any[]

      Event payload

    Returns boolean

  • Flushes all data buffered since cork was called.

    NOTE: It is HIGHLY recommended that uncorking should always be done via process.nextTick, not during the EventEmitter.on() call.

    Returns void

Generated using TypeDoc