Allow Field to specify its own data

This commit is contained in:
2026-03-18 17:32:53 +01:00
parent 93a642f242
commit 3855e478c0

View File

@@ -120,6 +120,7 @@ export interface Segment {
export interface Field { export interface Field {
type: FieldType; type: FieldType;
name: string; name: string;
data?: ArrayBuffer; // Optional raw data for the field (if needed for parsing / serialization)
value?: unknown; // Optional value for the field (used for serialization or as a default value) value?: unknown; // Optional value for the field (used for serialization or as a default value)
bits?: BitField[]; // Optional array of bit field definitions (for BITS type) bits?: BitField[]; // Optional array of bit field definitions (for BITS type)
length?: number; // Optional length for array types (e.g., BYTES, WORDS) length?: number; // Optional length for array types (e.g., BYTES, WORDS)