mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
15 lines
364 B
TypeScript
15 lines
364 B
TypeScript
import arrayifyStream from 'arrayify-stream';
|
|
import { Readable } from 'stream';
|
|
|
|
async function test() {
|
|
const readable = new Readable();
|
|
const items = [1, 2, 3];
|
|
items.forEach(item => readable.push(item));
|
|
|
|
const result: Promise<any[]> = arrayifyStream(readable);
|
|
const arr: any[] = await result;
|
|
|
|
// $ExpectError
|
|
arrayifyStream();
|
|
}
|