From a072ec382f8b8a2e2e90e2520c1b94a668b4bc3b Mon Sep 17 00:00:00 2001 From: Zhenwei Jin <109658203+kylo5aby@users.noreply.github.com> Date: Wed, 19 Jun 2024 16:29:05 +0800 Subject: [PATCH] doc: update the description of the return type for options.filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/52742 Refs: https://github.com/nodejs/node/pull/52461 Reviewed-By: Vinícius Lourenço Claro Cardoso Reviewed-By: Chengzhong Wu --- doc/api/fs.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index cf0d294b4acfdf..94633d5c4b3601 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1050,7 +1050,8 @@ 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: {boolean|Promise} A value that is coercible to `boolean` or + a `Promise` that fulfils with such value. * `force` {boolean} overwrite existing file or directory. The copy operation will ignore errors if you set this to false and the destination exists. Use the `errorOnExist` option to change this behavior. @@ -2464,7 +2465,8 @@ 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: {boolean|Promise} A value that is coercible to `boolean` or + a `Promise` that fulfils with such value. * `force` {boolean} overwrite existing file or directory. The copy operation will ignore errors if you set this to false and the destination exists. Use the `errorOnExist` option to change this behavior. @@ -5498,7 +5500,8 @@ 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: {boolean} Any non-`Promise` value that is coercible + to `boolean`. * `force` {boolean} overwrite existing file or directory. The copy operation will ignore errors if you set this to false and the destination exists. Use the `errorOnExist` option to change this behavior.