Interface NodeEventSource

Event source that uses a Node.js-like interface using on() and off().

interface NodeEventSource {
    emit(type, ...args): void;
    off(type, listener): void;
    on(type, listener): void;
    once(type, listener): void;
}

Hierarchy (view full)

Methods

Methods

  • Parameters

    • type: string
    • Rest ...args: unknown[]

    Returns void

  • Parameters

    • type: string
    • listener: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • type: string
    • listener: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • type: string
    • listener: (() => void)
        • (): void
        • Returns void

    Returns void

Generated using TypeDoc