Passed to both Writable and Readable constructors. Also has the following fields:

See also:

Fields

@:optionaloptionalwritev:Null<(chunks:Array<Chunk>, callback:Null<Error> ‑> Void) ‑> Void>

writev Implementation for the stream._writev() method.

@:optionaloptionalwrite:Null<(chunk:Dynamic, encoding:String, callback:Null<Error> ‑> Void) ‑> Void>

write Implementation for the stream._write() method.

@:optionaloptionalwritableObjectMode:Null<Bool>

Sets objectMode for writable side of the stream. Has no effect if objectMode is true. Default: false.

@:optionaloptionalwritableHighWaterMark:Null<Int>

Sets highWaterMark for the writable side of the stream. Has no effect if highWaterMark is provided.

@:optionaloptionalreadableObjectMode:Null<Bool>

Sets objectMode for readable side of the stream. Has no effect if objectMode is true. Default: false.

@:optionaloptionalreadableHighWaterMark:Null<Int>

Sets highWaterMark for the readable side of the stream. Has no effect if highWaterMark is provided.

@:optionaloptionalread:Null<(size:Int) ‑> Void>

Implementation for the stream._read() method.

@:optionaloptionalobjectMode:Null<Bool>

Whether this stream should behave as a stream of objects. Meaning that stream.read(n) returns a single value instead of a Buffer of size n. Default: false.

@:optionaloptionalhighWaterMark:Null<Int>

The maximum number of bytes to store in the internal buffer before ceasing to read from the underlying resource. Default: 16384 (16kb), or 16 for objectMode streams.

@:optionaloptionalfinal_:Null<(error:Null<Error>) ‑> Void>

final Implementation for the stream._final() method.

@:optionaloptionalencoding:Null<String>

If specified, then buffers will be decoded to strings using the specified encoding. Default: null.

@:optionaloptionalemitClose:Null<Bool>

Whether or not the stream should emit 'close' after it has been destroyed. Default: true.

@:optionaloptionaldestroy:Null<(err:Null<Error>, callback:Null<Error> ‑> Void) ‑> Void>

Implementation for the stream._destroy() method.

@:optionaloptionaldefaultEncoding:Null<String>

defaultEncoding The default encoding that is used when no encoding is specified as an argument to stream.write(). Default: 'utf8'.

@:optionaloptionaldecodeStrings:Null<Bool>

decodeStrings Whether to encode strings passed to stream.write() to Buffers (with the encoding specified in the stream.write() call) before passing them to stream._write(). Other types of data are not converted (i.e. Buffers are not decoded into strings). Setting to false will prevent strings from being converted. Default: true.

@:optionaloptionalautoDestroy:Null<Bool>

Whether this stream should automatically call .destroy() on itself after ending. Default: false.

@:optionaloptionalallowHalfOpen:Null<Bool>

If set to false, then the stream will automatically end the writable side when the readable side ends. Default: true.