@@ -450,6 +450,9 @@ changes:
450450
451451Write ` buffer` to the file.
452452
453+ If ` buffer` is a plain object, like all variations of ` writeFile` , it must have
454+ an own (not inherited) ` toString` function property.
455+
453456The promise is resolved with an object containing two properties:
454457
455458* ` bytesWritten` {integer} the number of bytes written
@@ -1290,8 +1293,8 @@ changes:
12901293* Returns: {Promise} Fulfills with `undefined` upon success.
12911294
12921295Asynchronously writes data to a file, replacing the file if it already exists.
1293- `data` can be a string, a {Buffer}, or an object with an own `toString` function
1294- property.
1296+ `data` can be a string, a {Buffer}, or, like all variations of `writeFile`, an
1297+ object with an own (not inherited) `toString` function property.
12951298
12961299The `encoding` option is ignored if `data` is a buffer.
12971300
@@ -3947,7 +3950,9 @@ When `file` is a file descriptor, the behavior is similar to calling
39473950a file descriptor.
39483951
39493952The ` encoding` option is ignored if ` data` is a buffer.
3950- If ` data` is a normal object, it must have an own ` toString` function property.
3953+
3954+ If ` data` is a plain object, like all variations of ` writeFile` , it must have an
3955+ own (not inherited) ` toString` function property.
39513956
39523957` ` ` mjs
39533958import { writeFile } from ' fs' ;
@@ -5034,6 +5039,9 @@ changes:
50345039
50355040Returns ` undefined ` .
50365041
5042+ If ` data` is a plain object, like all variations of ` writeFile` , it must have an
5043+ own (not inherited) ` toString` function property.
5044+
50375045For detailed information, see the documentation of the asynchronous version of
50385046this API: [` fs .writeFile ()` ][].
50395047
0 commit comments