DecodeStreamOptions
Defined in: packages/format-core/src/decode-stream.ts:7
Options for DecodeStream.
Type Parameters
Section titled “Type Parameters”T
View
Chunk = View
W = never
Properties
Section titled “Properties”buffer
Section titled “buffer”
readonlybuffer:DecodeBuffer<View,Chunk>
Defined in: packages/format-core/src/decode-stream.ts:17
Accumulates undecoded input between transform() calls.
Supplied rather than constructed here because the buffer is what pins the
view type: ByteAccumulator for a byte decoder, TextBuffer for a
text one, ChunkListBuffer for a cursor one. Each carries its own
mandatory retention ceiling, which is the constraint net-core’s
FrameLink documents.
onError?
Section titled “onError?”
readonlyoptionalonError?: (error) =>void
Defined in: packages/format-core/src/decode-stream.ts:24
Called for a recoverable violation instead of ending the stream. Web Streams have no non-fatal error channel, so recovery is a policy the caller supplies. Omit it and the first recoverable error ends the stream.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”void
onWarnings?
Section titled “onWarnings?”
readonlyoptionalonWarnings?: (warnings,value) =>void
Defined in: packages/format-core/src/decode-stream.ts:27
Called alongside a decoded value that carries best-effort diagnostics.
Parameters
Section titled “Parameters”warnings
Section titled “warnings”readonly W[]
T
Returns
Section titled “Returns”void