@@ -1684,8 +1684,8 @@ const myWritable = new Writable({
16841684The ` stream.Writable ` class is extended to implement a [ ` Writable ` ] [ ] stream.
16851685
16861686Custom ` Writable ` streams * must* call the ` new stream.Writable([options]) `
1687- constructor and implement the ` writable._write() ` method. The
1688- ` writable._writev() ` method * may * also be implemented .
1687+ constructor and implement the ` writable._write() ` and/or ` writable._writev() `
1688+ method.
16891689
16901690#### Constructor: new stream.Writable([ options] )
16911691<!-- YAML
@@ -1774,6 +1774,12 @@ const myWritable = new Writable({
17741774```
17751775
17761776#### writable.\_ write(chunk, encoding, callback)
1777+ <!-- YAML
1778+ changes:
1779+ - version: REPLACEME
1780+ pr-url: https://github.com/nodejs/node/pull/29639
1781+ description: _write() is optional when providing _writev().
1782+ -->
17771783
17781784* ` chunk ` {Buffer|string|any} The ` Buffer ` to be written, converted from the
17791785 ` string ` passed to [ ` stream.write() ` ] [ stream-write ] . If the stream's
@@ -1787,7 +1793,8 @@ const myWritable = new Writable({
17871793 argument) when processing is complete for the supplied chunk.
17881794
17891795All ` Writable ` stream implementations must provide a
1790- [ ` writable._write() ` ] [ stream-_write ] method to send data to the underlying
1796+ [ ` writable._write() ` ] [ stream-_write ] and/or
1797+ [ ` writable._writev() ` ] [ stream-_writev ] method to send data to the underlying
17911798resource.
17921799
17931800[ ` Transform ` ] [ ] streams provide their own implementation of the
@@ -1830,8 +1837,8 @@ This function MUST NOT be called by application code directly. It should be
18301837implemented by child classes, and called by the internal ` Writable ` class
18311838methods only.
18321839
1833- The ` writable._writev() ` method may be implemented in addition to
1834- ` writable._write() ` in stream implementations that are capable of processing
1840+ The ` writable._writev() ` method may be implemented in addition or alternatively
1841+ to ` writable._write() ` in stream implementations that are capable of processing
18351842multiple chunks of data at once. If implemented, the method will be called with
18361843all chunks of data currently buffered in the write queue.
18371844
0 commit comments