Interface Subscription<T>

interface Subscription<T> {
    close(): void;
    off(type: "error", cb: ((error: Error) => void)): void;
    off(type: "data", cb: ((data: T) => void)): void;
    off(type: "close", cb: (() => void)): void;
    on(type: "error", cb: ((error: Error) => void)): void;
    on(type: "data", cb: ((data: T) => void)): void;
    on(type: "close", cb: (() => void)): void;
}

Type Parameters

  • T

Implemented by

Methods

Methods