Skip to content

Commit

Permalink
doc: fix type in stream doc
Browse files Browse the repository at this point in the history
Extend return type of `read()` method with `any` which is a
valid return type for readable streams in object mode.

PR-URL: #21178
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
  • Loading branch information
KonanMentor authored and targos committed Jun 13, 2018
1 parent 76927fc commit 5e46c16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ added: v0.9.4
-->

* `size` {number} Optional argument to specify how much data to read.
* Returns: {string|Buffer|null}
* Returns: {string|Buffer|null|any}

The `readable.read()` method pulls some data out of the internal buffer and
returns it. If no data available to be read, `null` is returned. By default,
Expand Down

0 comments on commit 5e46c16

Please sign in to comment.