Interface Emitter<T>

A function that emits events, with a .source they're emitted from

Created using emitter.

interface Emitter<T> {
    end: (() => void);
    source: Source<T>;
    throw: ((e: any) => void);
    (val: T): void;
}

Type Parameters

  • T

Hierarchy (view full)

  • Call the emitter to emit events on its .source

    Parameters

    • val: T

    Returns void

Properties

Properties

end: (() => void)

Close all current subscribers' connections

Type declaration

    • (): void
    • Returns void

source: Source<T>

An event source that receives the events

throw: ((e: any) => void)

Close all current subscribers' connections with an error

Type declaration

    • (e: any): void
    • Parameters

      • e: any

      Returns void