DefinitelyTyped/types/streamify-array/streamify-array-tests.ts
2020-06-16 02:17:03 -07:00

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();