3.0.0 • Published 5 months ago
@types/consumable-stream v3.0.0
Installation
npm install --save @types/consumable-stream
Summary
This package contains type definitions for consumable-stream (https://github.com/SocketCluster/consumable-stream).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/consumable-stream/v1.
index.d.ts
// Type definitions for consumable-stream 1.0
// Project: https://github.com/SocketCluster/consumable-stream
// Definitions by: Daniel Rose <https://github.com/DanielRose>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 3.7
/// <reference types="node" />
declare abstract class ConsumableStream<T> implements AsyncIterator<T>, AsyncIterable<T> {
next(timeout?: number): Promise<IteratorResult<T>>;
once(timeout?: number): Promise<T>;
abstract createConsumer(timeout?: number): ConsumableStream.Consumer<T>;
createConsumable(timeout?: number): AsyncIterable<T>;
[Symbol.asyncIterator](): AsyncIterator<T>;
}
export = ConsumableStream;
declare namespace ConsumableStream {
interface Consumer<T> {
next(): Promise<IteratorResult<T>>;
return(): void;
}
}
Additional Details
- Last updated: Tue, 15 Feb 2022 19:01:34 GMT
- Dependencies: @types/node
- Global values: none
Credits
These definitions were written by Daniel Rose.