Interface: LoopSegmentSpec
A segment slot inside a loop body. Carries the segment id, its TR3
usage + cardinality, and an optional position label (e.g. "Loop 2300 #2") used by Phase 3+ loop-walker diagnostics. Stored verbatim by
defineLoopSpec; no validation beyond the structural shape so consumers
can author payer-specific segment specs without re-deriving each rule.
Example
import type { LoopSegmentSpec } from "@cosyte/x12";
const clm: LoopSegmentSpec = { id: "CLM", usage: "required", max: 1 };
Properties
description?
readonlyoptionaldescription?:string
id
readonlyid:string
max
readonlymax:LoopMax
position?
readonlyoptionalposition?:string
usage
readonlyusage:LoopUsage