7.0.0 • Published 11 months ago
@types/async-stream-emitter v7.0.0
Installation
npm install --save @types/async-stream-emitter
Summary
This package contains type definitions for async-stream-emitter (https://github.com/SocketCluster/async-stream-emitter).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/async-stream-emitter/v3.
index.d.ts
// Type definitions for async-stream-emitter 3.0
// Project: https://github.com/SocketCluster/async-stream-emitter
// Definitions by: Daniel Rose <https://github.com/DanielRose>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 3.7
import ConsumableStream = require('consumable-stream');
import Consumer = require('writable-consumable-stream/consumer');
declare class AsyncStreamEmitter<T> {
emit(eventName: string, data: T): void;
listener(eventName: string): ConsumableStream<T>;
closeListener(eventName: string): void;
closeAllListeners(): void;
getListenerConsumerStats(consumerId: number): Consumer.ConsumerStats;
getListenerConsumerStatsList(eventName: string): Consumer.ConsumerStats[];
getAllListenersConsumerStatsList(): Consumer.ConsumerStats[];
killListener(eventName: string): void;
killAllListeners(): void;
killListenerConsumer(consumerId: number): void;
getListenerBackpressure(eventName: string): number;
getAllListenersBackpressure(): number;
getListenerConsumerBackpressure(consumerId: number): number;
hasListenerConsumer(eventName: string, consumerId: number): boolean;
hasAnyListenerConsumer(consumerId: number): boolean;
}
export = AsyncStreamEmitter;
Additional Details
- Last updated: Tue, 15 Feb 2022 19:01:33 GMT
- Dependencies: @types/consumable-stream, @types/writable-consumable-stream
- Global values: none
Credits
These definitions were written by Daniel Rose.