Type Alias: OnWarningCallback
OnWarningCallback = (
warning) =>void
Callback invoked inline each time the parser emits a Tier-2 warning.
Always fires BEFORE the warning is appended to CcdaDocument.warnings so
consumers observe warnings in the same order the parser discovered them.
Parameters
warning
Returns
void
Example
import { parseCcda, type OnWarningCallback } from "@cosyte/ccda";
const onWarning: OnWarningCallback = (w) => {
console.warn(w.code, w.message);
};
parseCcda(raw, { onWarning });