From 7832b1815f9b42a1d0265fae772f918d9ddc49c4 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 5d0dd605b328be..9a12289739f64f 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -2399,6 +2399,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 fd9e1e316bc416..bfb81ce8177b1d 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -3045,7 +3045,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) {