doc: fix param type of `fs.write`
6-arg version of fs.write
doesn't support string as the 2nd arg,
and similarly 5-arg version fs.writeSync
doesn't support string
as the 2nd arg. This change removes those unsupported types from
the API docs.
(string type is supported for 5-arg version of fs.write
, and 4-arg version of fs.writeSync
and those are covered by the next entries)
Examples to support the above claim:
fs.write(process.stdout.fd, Buffer.from([0x61]), 0, 1, null, () => {});
// => prints 'a'
fs.write(process.stdout.fd, "a", 0, 1, null, () => {});
// => throws ERR_INVALID_CALLBACK