-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
doc: remove confusing signature in fs.md #18310
Conversation
doc/api/fs.md
Outdated
@@ -2762,8 +2762,6 @@ added: v0.1.31 | |||
|
|||
* `filename` {string|Buffer} | |||
* `listener` {Function|undefined} **Default:** `undefined` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since listener
is listed as optional in the signature, we may just remove the undefined
here and mention it is optional.
Also to avoid the confusion, maybe something like
- `listener` {Function} Optional, a listener previously attached using `fs.watchFile()`
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
PR-URL: #18310 Fixes: #18305 Refs: #13424 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Landed in 9870b53 |
PR-URL: #18310 Fixes: #18305 Refs: #13424 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Richard Lau <[email protected]>
PR-URL: #18310 Fixes: #18305 Refs: #13424 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Richard Lau <[email protected]>
PR-URL: nodejs#18310 Fixes: nodejs#18305 Refs: nodejs#13424 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
doc, fs
Fixes: #18305
This signature has been added in #13424. It seems to be erroneous as it can make an inattentive reader (me at least) think that
listener
is not a previously defined listener forfs.watchFile()
, but a new callback forfs.unwatchFile()
. Sorry if I am wrong and doubly confusing.