Skip to content

Commit f3c714b

Browse files
F3n67unodejs-github-bot
authored andcommitted
doc: add err param to fs.copyFile callback
PR-URL: #53234 Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 21f38f8 commit f3c714b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

‎doc/api/fs.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2388,6 +2388,7 @@ changes:
23882388
* `dest`{string|Buffer|URL} destination filename of the copy operation
23892389
* `mode`{integer} modifiers for copy operation. **Default:** `0`.
23902390
* `callback`{Function}
2391+
* `err`{Error}
23912392
23922393
Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it
23932394
already exists. No arguments other than a possible exception are given to the

‎lib/fs.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2984,7 +2984,7 @@ function mkdtempSync(prefix, options){
29842984
* @param{string | Buffer | URL} src
29852985
* @param{string | Buffer | URL} dest
29862986
* @param{number} [mode]
2987-
* @param{() => any} callback
2987+
* @param{(err?: Error) => any} callback
29882988
* @returns{void}
29892989
*/
29902990
functioncopyFile(src,dest,mode,callback){

0 commit comments

Comments
(0)