Skip to content

Commit

Permalink
Add "static from" to stream$Readable
Browse files Browse the repository at this point in the history
Summary:
- Add `static from` to `stream$Readable`
[https://nodejs.org/api/stream.html#stream_stream_readable_from_iterable_options](https://nodejs.org/api/stream.html#stream_stream_readable_from_iterable_options)

- Add a few tests for it in **node_tests/stream.js**

Pull Request resolved: #8615

Reviewed By: samwgoldman

Differential Revision: D27082989

Pulled By: mroch

fbshipit-source-id: e7b9c7cfda3b87364097eb127bdd03295305a10a
  • Loading branch information
Alin Galatan authored and facebook-github-bot committed Mar 17, 2021
1 parent 9dd8cc6 commit 2a344d7
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 92 deletions.
2 changes: 2 additions & 0 deletions lib/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,8 @@ type readableStreamOptions = {
...
};
declare class stream$Readable extends stream$Stream {
static from(iterable: Iterable<any> | AsyncIterable<any>, options?: readableStreamOptions): stream$Readable;

constructor(options?: readableStreamOptions): void;
destroy(error?: Error): this;
isPaused(): boolean;
Expand Down
Loading

0 comments on commit 2a344d7

Please sign in to comment.