DefinitelyTyped/types/streamify-array/streamify-array-tests.ts

10 lines
268 B
TypeScript
Raw Normal View History

2020-06-16 09:17:03 +00:00
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();