Read-only stream contract.
read and readSync are intentionally generic and may return either
string or buffer depending on the concrete stream source.
Use readBuffer variants when you specifically need buffer.
@eryx/stream/types ModuleCloses this stream, setting closed to true
Non-yielding version of close
A boolean indicating if this stream is already closed
Read data from the stream.
The formal Stream contract defines this as always returning a
string.
Some implementations of streams may augment this function to return
string? in non-blocking contexts.
Marks that this stream is readable
Read data from the stream, returning the data as a buffer. See read.
Non-yielding version of readBuffer
Marks that this stream is readable
Marks that this stream is writable
Writes data to the stream
Marks that this stream is writable
Returns the current file cursor position.
Flushes buffered data
Flushes buffered data
Read-only stream contract.
read and readSync are intentionally generic and may return either
string or buffer depending on the concrete stream source.
Use readBuffer variants when you specifically need buffer.
Indicates that this stream is read-only
Write-only stream contract.
write and writeSync accept string | buffer to support both text and
binary producer code with one surface.
Indicates that this stream is write-only
Duplex stream contract.
This is effectively ReadOnlyStream & WriteOnlyStream with explicit tags.