Function: groupCountMismatch()
groupCountMismatch(
position,declared,actual):X12ParseWarning
Build an X12_GROUP_COUNT_MISMATCH warning. Emitted when IEA-01 does not
equal the actual number of GS..GE groups present in the interchange.
Trading partners use this to detect transmission truncation; the parser
surfaces both values verbatim and never silently corrects them.
Parameters
position
declared
string
actual
number
Returns
Example
import { groupCountMismatch } from "@cosyte/x12";
const w = groupCountMismatch(
{ segmentIndex: 5, interchangeIndex: 0, elementIndex: 1 },
"2",
1,
);