★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/5e46c16371Nouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files

doc: fix type in stream doc

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 <matteo.collina@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
  • Loading branch information...
KonanMentor authored and targos committed Jun 7, 2018
1 parent 76927fc commit 5e46c16371241f89f87b0571e9b8675475aca5f2
Showing with 1 addition and 1 deletion.
  1. +1 −1 doc/api/stream.md
@@ -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,

0 comments on commit 5e46c16

Please sign in to comment.
You can’t perform that action at this time.