Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConsoleTransport

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

level

level: string

listeners

listeners: EventListener[] = []

template

template: string

Accessors

maxListeners

  • get maxListeners(): number
  • set maxListeners(value: number): void
  • Returns number

  • Parameters

    • value: number

    Returns void

Methods

emit

  • emit(namespace: string, ...data: any[]): void
  • Parameters

    • namespace: string
    • Rest ...data: any[]

    Returns void

execute

on

  • on(namespace: string | RegExp, callback: Function, once?: boolean): EventListener
  • Subscribe a callable function to a namespace.

    Parameters

    • namespace: string | RegExp
    • callback: Function
    • Default value once: boolean = false

    Returns EventListener

    Used to manage the subscription status via open and close methods.

once

  • once(namespace: string | RegExp, callback: Function): EventListener
  • Subscribe a callable function to a namespace, for exactly one execution.

    Parameters

    • namespace: string | RegExp
    • callback: Function

    Returns EventListener

    Used to manage the subscription status via open and close methods.

pop

  • pop(listener: EventListener): boolean
  • Remove a Listener instance from the EventNamespace instance. Called with unsubscribe method.

    Parameters

    • listener: EventListener

    Returns boolean

    A true value indicates a successful pop.

push

  • push(listener: EventListener): void
  • Add a Listener instance to the EventNamespace instance. Called with subscribe method.

    Parameters

    • listener: EventListener

    Returns void