Skip to main content
Version: v0.0.2

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?

readonly optional description?: string


id

readonly id: string


max

readonly max: LoopMax


position?

readonly optional position?: string


usage

readonly usage: LoopUsage