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

doc: remove confusing signature in fs.md #18310

Closed
wants to merge 1 commit into from
Closed

doc: remove confusing signature in fs.md #18310

wants to merge 1 commit into from

Conversation

vsemozhetbyt
Copy link
Contributor

@vsemozhetbyt vsemozhetbyt commented Jan 23, 2018

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
Affected 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 for fs.watchFile(), but a new callback for fs.unwatchFile(). Sorry if I am wrong and doubly confusing.

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. labels Jan 23, 2018
@vsemozhetbyt vsemozhetbyt added the fast-track PRs that do not need to wait for 48 hours to land. label Jan 23, 2018
doc/api/fs.md Outdated
@@ -2762,8 +2762,6 @@ added: v0.1.31

* `filename` {string|Buffer}
* `listener` {Function|undefined} **Default:** `undefined`
Copy link
Member

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()`

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@vsemozhetbyt
Copy link
Contributor Author

vsemozhetbyt added a commit that referenced this pull request Jan 23, 2018
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]>
@vsemozhetbyt
Copy link
Contributor Author

Landed in 9870b53

@vsemozhetbyt vsemozhetbyt deleted the doc-fs-del-err-signature branch January 23, 2018 10:57
evanlucas pushed a commit that referenced this pull request Jan 30, 2018
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]>
MylesBorins pushed a commit that referenced this pull request Feb 27, 2018
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]>
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. fast-track PRs that do not need to wait for 48 hours to land. fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants