From 862f1cace00e45294c06d8160d4373b8227015c7 Mon Sep 17 00:00:00 2001 From: Feng Yu Date: Fri, 31 May 2024 14:45:18 -0700 Subject: [PATCH] doc: add err param to fs.cp callback PR-URL: https://github.com/nodejs/node/pull/53234 Reviewed-By: LiviaMedeiros Reviewed-By: Luigi Pinca --- doc/api/fs.md | 1 + lib/fs.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 44c38ccafceade..34742f629a1daf 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2477,6 +2477,7 @@ changes: * `verbatimSymlinks` {boolean} When `true`, path resolution for symlinks will be skipped. **Default:** `false` * `callback` {Function} + * `err` {Error} Asynchronously copies the entire directory structure from `src` to `dest`, including subdirectories and files. diff --git a/lib/fs.js b/lib/fs.js index b4b2a320e75f37..f47dba6e43debb 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -3030,7 +3030,7 @@ function copyFileSync(src, dest, mode) { * @param {string | URL} src * @param {string | URL} dest * @param {object} [options] - * @param {() => any} callback + * @param {(err?: Error) => any} callback * @returns {void} */ function cp(src, dest, options, callback) {