@types/consumable-stream
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

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.

index.d.ts

/// <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>;
    [Symbol.asyncIterator](): AsyncIterator<T>;
}

export = ConsumableStream;

declare namespace ConsumableStream {
    interface Consumer<T> {
        next(): Promise<IteratorResult<T>>;
        return(): void;
    }
}

Additional Details

  • Last updated: Sat, 30 Dec 2023 03:35:44 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Daniel Rose, and Nathan Bierema.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @types/consumable-stream

    Weekly Downloads

    3,199

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    3.94 kB

    Total Files

    5

    Last publish

    Collaborators

    • types