Options
All
  • Public
  • Public/Protected
  • All
Menu

event-emitter-typesafe

Index

Classes

Interfaces

Functions

Functions

makeEventEmitter

  • makeEventEmitter<K>(target: K): void
  • Attaches the methods defined in the EventEmitter prototype to the prototype of the target. The reason to manipulate the prototype instead of making it extend the EventEmitter is to keep the prototype chain as it was.

    throws

    This function will throw an Error if a property with the same name was already present on the prototype of the target.

    Type parameters

    • K: { constructor: any }

    Parameters

    • target: K

      To manipulate the prototype of.

    Returns void

Generated using TypeDoc