UnknownBlock
Defined in: src/types/messages.ts:1303
Content block of a type this SDK version does not recognize, kept when restoring data a newer version saved. Holds the raw data so it serializes back unchanged. Model providers skip it.
Implements
Section titled “Implements”JSONSerializable<Record<string,unknown>>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new UnknownBlock(data): UnknownBlock;Defined in: src/types/messages.ts:1314
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data | Record<string, unknown> |
Returns
Section titled “Returns”UnknownBlock
Properties
Section titled “Properties”readonly type: "unknownBlock";Defined in: src/types/messages.ts:1307
Discriminator for unrecognized content.
readonly data: Record<string, unknown>;Defined in: src/types/messages.ts:1312
The raw content block data.
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): Record<string, unknown>;Defined in: src/types/messages.ts:1322
Returns the raw content block data unchanged. Called automatically by JSON.stringify().
Returns
Section titled “Returns”Record<string, unknown>
Implementation of
Section titled “Implementation of”JSONSerializable.toJSON
fromJSON()
Section titled “fromJSON()”static fromJSON(data): UnknownBlock;Defined in: src/types/messages.ts:1332
Creates an UnknownBlock instance from raw content block data.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
data | Record<string, unknown> | Raw content block data |
Returns
Section titled “Returns”UnknownBlock
UnknownBlock instance