-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
base: main
Are you sure you want to change the base?
Conversation
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`. |
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.
* 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. |
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. 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`. |
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.
* Returns: the type that is coercible to `boolean`. | |
* Returns: {boolean} Any non-`Promise` value that is coercible to `boolean`. |
can you please take a look @aduh95 |
The return type of
options.filter
infs.cp
,fs.cpSync
, andfsPromises.cp
can be coerced to types that are coercible toboolean
, not onlyboolean
, So I update related contents in the doc.Once this PR has no further issues, I will close #52461.
Refs: #52461