mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
10 lines
268 B
TypeScript
10 lines
268 B
TypeScript
import streamifyArray from 'streamify-array';
|
|
import { Readable } from 'stream';
|
|
|
|
const stream: Readable = streamifyArray([1, 2, 3]);
|
|
stream.on('data', (d) => console.log('Data: ' + d));
|
|
stream.on('end', () => console.log('Done!'));
|
|
|
|
// $ExpectError
|
|
streamifyArray();
|