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; } Methods
close
- close(): void
Returns void
off
- off(type, cb): void
Parameters
- type: "error"
- cb: ((error: Error) => void)
- (error): void
Returns void
Returns void
- off(type, cb): void
Parameters
- type: "data"
- cb: ((data: T) => void)
Returns void
- off(type, cb): void
Parameters
- type: "close"
- cb: (() => void)
Returns void
on
- on(type, cb): void
Parameters
- type: "error"
- cb: ((error: Error) => void)
- (error): void
Returns void
Returns void
- on(type, cb): void
Parameters
- type: "data"
- cb: ((data: T) => void)
Returns void
- on(type, cb): void
Parameters
- type: "close"
- cb: (() => void)
Returns void