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: update the description of the return type for options.filter #52742

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kylo5aby
Copy link
Contributor

The return type of options.filter in fs.cp, fs.cpSync, and fsPromises.cp can be coerced to types that are coercible to boolean, not only boolean, So I update related contents in the doc.

Once this PR has no further issues, I will close #52461.

Refs: #52461

@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 Apr 29, 2024
@kylo5aby
Copy link
Contributor Author

/cc @aduh95 @jasnell

doc/api/fs.md Outdated
@@ -1049,7 +1049,7 @@ changes:
that resolves to `true` or `false` **Default:** `undefined`.
* `src` {string} source path to copy.
* `dest` {string} destination path to copy to.
* Returns: {boolean|Promise}
* Returns: `Promise` or the type that is coercible to `boolean`.
Copy link
Contributor

@aduh95 aduh95 Apr 30, 2024

Choose a reason for hiding this comment

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

Suggested change
* Returns: `Promise` or the type that is coercible to `boolean`.
* Returns: {boolean|Promise} A value that is coercible to `boolean` or a `Promise` that fulfils with such value.

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. thanks :)

doc/api/fs.md Outdated
@@ -5447,7 +5447,7 @@ changes:
all of its contents will be skipped as well. **Default:** `undefined`
* `src` {string} source path to copy.
* `dest` {string} destination path to copy to.
* Returns: {boolean}
* Returns: the type that is coercible to `boolean`.
Copy link
Contributor

@aduh95 aduh95 Apr 30, 2024

Choose a reason for hiding this comment

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

Suggested change
* Returns: the type that is coercible to `boolean`.
* Returns: {boolean} Any non-`Promise` value that is coercible to `boolean`.

@kylo5aby
Copy link
Contributor Author

can you please take a look @aduh95

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. fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants