PersistEncodeError

class
persistence/persist.ts:95

extends Error

What an encode had to give up, reported under the "encode" phase.

Two different losses, with two different outcomes. A **truncated** encode (state past PersistOptions.maxNodes) is never written, so written is false and storage keeps its previous value. **Unsupported** values (functions, symbols, class instances the codec cannot represent) are written as markers, so written is true and unsupported names their paths.

Constructor

constructor

signature
new(truncated, unsupported, written): PersistEncodeError

Parameters

NameTypeDescription
truncatedboolean
NameTypeDescription
unsupportedreadonly string[]
NameTypeDescription
writtenboolean

Returns

PersistEncodeError

Properties

NameTypeDescription
truncatedbooleanThe state exceeded the node budget.
unsupportedreadonly string[]Paths of values written as markers because they have no faithful representation.
writtenbooleanWhether anything was written.