@@ -440,6 +440,9 @@ changes:
440440
441441Write `buffer` to the file.
442442
443+ If `buffer` is a plain object, it must have an own (not inherited) `toString`
444+ function property.
445+
443446The promise is resolved with an object containing two properties:
444447
445448* `bytesWritten` {integer} the number of bytes written
@@ -1284,8 +1287,8 @@ changes:
12841287* Returns: {Promise} Fulfills with `undefined` upon success.
12851288
12861289Asynchronously writes data to a file, replacing the file if it already exists.
1287- `data` can be a string, a {Buffer}, or an object with an own `toString` function
1288- property.
1290+ `data` can be a string, a {Buffer}, or, an object with an own (not inherited)
1291+ `toString` function property.
12891292
12901293The `encoding` option is ignored if `data` is a buffer.
12911294
@@ -3937,7 +3940,9 @@ When `file` is a file descriptor, the behavior is similar to calling
39373940a file descriptor.
39383941
39393942The `encoding` option is ignored if `data` is a buffer.
3940- If `data` is a normal object, it must have an own `toString` function property.
3943+
3944+ If `data` is a plain object, it must have an own (not inherited) `toString`
3945+ function property.
39413946
39423947```mjs
39433948import { writeFile } from 'fs';
@@ -5031,6 +5036,9 @@ changes:
50315036
50325037Returns `undefined`.
50335038
5039+ If `data` is a plain object, it must have an own (not inherited) `toString`
5040+ function property.
5041+
50345042For detailed information, see the documentation of the asynchronous version of
50355043this API: [`fs.writeFile()`][].
50365044
@@ -5065,6 +5073,9 @@ changes:
50655073* `position` {integer}
50665074* Returns: {number} The number of bytes written.
50675075
5076+ If `buffer` is a plain object, it must have an own (not inherited) `toString`
5077+ function property.
5078+
50685079For detailed information, see the documentation of the asynchronous version of
50695080this API: [`fs.write(fd, buffer...)`][].
50705081
@@ -5091,6 +5102,9 @@ changes:
50915102* `encoding` {string}
50925103* Returns: {number} The number of bytes written.
50935104
5105+ If `string` is a plain object, it must have an own (not inherited) `toString`
5106+ function property.
5107+
50945108For detailed information, see the documentation of the asynchronous version of
50955109this API: [`fs.write(fd, string...)`][].
50965110
0 commit comments