Skip to main content
Version: v0.0.2

Type Alias: SegmentSpec

SegmentSpec = readonly string[]

A single body segment as a raw element array: [segmentId, ...elements], 1-indexed against the X12 spec convention once placed (i.e. spec[1] is element 1). Element values are LOGICAL - the builder applies the ?-release-character escape on emit so any active delimiter inside a value survives. The segment id (spec[0]) is emitted verbatim. ST and SE are NOT included here - the builder synthesizes them from TransactionSetSpec.

Example

const nm1: SegmentSpec = ["NM1", "IL", "1", "DOE", "JANE"];