Options for Readable private constructor. For stream implementors only, see node.js API documentation

Fields

@: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.

@: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.

@:optionaloptionalautoDestroy:Null<Bool>

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