Skip to main content
Version: v0.0.3

Interface: ParseCtx

Parse context threaded into every datatype parser so it can surface a Tier-2 warning (e.g. INVALID_NULL_FLAVOR, MALFORMED_DATETIME) in discovery order. Datatypes that have nothing to warn about simply never call emit.

Example

import { type ParseCtx, parsePq } from "@cosyte/ccda";
const ctx: ParseCtx = { emit: (w) => console.warn(w.code) };
parsePq(el, ctx);

Properties

emit

readonly emit: (warning) => void

Parameters

warning

CcdaWarning

Returns

void


terminology?

readonly optional terminology?: TerminologyAdapter

The optional consumer-supplied TerminologyAdapter. When present, the code-system recognition layer (checkCodeSlot) calls it to semantically validate coded values; when absent, recognition falls back to structural checks only. @cosyte/ccda never constructs one, it only calls the adapter a consumer passed to parseCcda / buildCcda.