Skip to content

DecodeContext

Defined in: packages/format-core/src/decode-context.ts:7

Read-only signal from a driver to a decoder about the state of the source.

All fields are optional so a non-live driver (a one-shot buffer, a finished stream) never has to fabricate a context just to satisfy the type.

readonly optional atEof?: boolean

Defined in: packages/format-core/src/decode-context.ts:12

No further input will arrive; this is the last chance to decode.


readonly optional atMessageBoundary?: boolean

Defined in: packages/format-core/src/decode-context.ts:19

The view holds exactly one transport-delivered unit (datagram mode). An incomplete result is a truncation error rather than a request for more input.


readonly optional timedOut?: boolean

Defined in: packages/format-core/src/decode-context.ts:9

A silence timer armed by a pending result has fired.