Skip to content

Commit

Permalink
doc: add explicit declaration of fd with null val
Browse files Browse the repository at this point in the history
In example of implementing a writable stream with extending on
Writable add explicit declaration of 'fd' (file descriptor)
variable with null value.
It will make this example more similar to readable stream's one.
And will make it easier to figure out in topic.

PR-URL: #40704
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
Gena888 authored and danielleadams committed Dec 13, 2021
1 parent 9cfdf15 commit 94d0911
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions doc/api/stream.md
Expand Up @@ -2558,6 +2558,7 @@ class WriteStream extends Writable {
constructor(filename) {
super();
this.filename = filename;
this.fd = null;
}
_construct(callback) {
fs.open(this.filename, (err, fd) => {
Expand Down

0 comments on commit 94d0911

Please sign in to comment.