Skip to content

Commit b67c4b4

Browse files
mcollinaaddaleax
authored andcommitted
doc: document that stream.on('close') was changed in Node 10
See: #25373 See: #18438 PR-URL: #25413 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Sam Roberts <[email protected]>
1 parent d86a3e8 commit b67c4b4

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

doc/api/stream.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,19 @@ added: v0.9.4
219219
##### Event: 'close'
220220
<!-- YAML
221221
added: v0.9.4
222+
changes:
223+
- version: v10.0.0
224+
pr-url: https://github.com/nodejs/node/pull/18438
225+
description: Add `emitClose` option to specify if `'close'` is emitted on
226+
destroy.
222227
-->
223228

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

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

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

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

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

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

0 commit comments

Comments
 (0)