# @types/consumable-stream

> TypeScript definitions for consumable-stream

Latest version **3.0.0** (published 2023-12-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/consumable-stream
pnpm add @types/consumable-stream
yarn add @types/consumable-stream
bun add @types/consumable-stream
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2023-12-30 |
| First published | 2020-02-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51443 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/consumable-stream
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/consumable-stream
- npm.io page: https://npm.io/package/@types/consumable-stream

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 3.0.0 (latest) — 2023-12-30
- 2.0.2 (ts4.5) — 2023-11-07
- 2.0.0 (ts3.8) — 2022-02-15
- 1.0.1 (ts3.7) — 2021-07-09
- 1.0.0 (ts2.8) — 2020-02-05
- 1.0.4 — 2023-11-07
- 1.0.3 — 2023-10-18
- 2.0.1 — 2023-10-18
- 1.0.2 — 2022-02-15

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/consumable-stream/index.d.ts)
````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](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Daniel Rose](https://github.com/DanielRose), and [Nathan Bierema](https://github.com/Methuselah96).

---
_Source: https://npm.io/package/@types/consumable-stream · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
