Skip to content
Permalink
Browse files

doc: document that stream.on('close') was changed in Node 10

See: #25373
See: #18438

PR-URL: #25413
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
  • Loading branch information...
mcollina authored and addaleax committed Jan 9, 2019
1 parent d86a3e8 commit b67c4b4f99a6971c05d371ea2fa0ff9fa653fd4b
Showing with 14 additions and 2 deletions.
  1. +14 −2 doc/api/stream.md
@@ -219,13 +219,19 @@ added: v0.9.4
##### Event: 'close'
<!-- YAML
added: v0.9.4
changes:
- version: v10.0.0
pr-url: https://github.com/nodejs/node/pull/18438
description: Add `emitClose` option to specify if `'close'` is emitted on
destroy.
-->

The `'close'` event is emitted when the stream and any of its underlying
resources (a file descriptor, for example) have been closed. The event indicates
that no more events will be emitted, and no further computation will occur.

Not all `Writable` streams will emit the `'close'` event.
A [`Writable`][] stream will always emit the `'close'` event if it is
created with the `emitClose` option.

##### Event: 'drain'
<!-- YAML
@@ -704,13 +710,19 @@ added: v0.9.4
##### Event: 'close'
<!-- YAML
added: v0.9.4
changes:
- version: v10.0.0
pr-url: https://github.com/nodejs/node/pull/18438
description: Add `emitClose` option to specify if `'close'` is emitted on
destroy.
-->

The `'close'` event is emitted when the stream and any of its underlying
resources (a file descriptor, for example) have been closed. The event indicates
that no more events will be emitted, and no further computation will occur.

Not all [`Readable`][] streams will emit the `'close'` event.
A [`Readable`][] stream will always emit the `'close'` event if it is
created with the `emitClose` option.

##### Event: 'data'
<!-- YAML

0 comments on commit b67c4b4

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