Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: document that stream.on('close') was changed in Node 10. #25413

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down