Type alias DebugLogger<EventData, Name>

DebugLogger<EventData, Name>: ((type, debugName, eventName?, eventData?) => void)

Emittery can collect and log debug information.

To enable this feature set the DEBUG environment variable to emittery or *. Additionally, you can set the static isDebugEnabled variable to true on the Emittery class, or myEmitter.debug.enabled on an instance of it for debugging a single instance.

See API for more information on how debugging works.

Type Parameters

Type declaration

    • (type, debugName, eventName?, eventData?): void
    • Parameters

      • type: string
      • debugName: string
      • Optional eventName: Name
      • Optional eventData: EventData[Name]

      Returns void

Generated using TypeDoc