Skip to content

Interface: Diagnostic ​

One diagnostic emitted by the library.

Properties ​

code ​

readonly code: DiagnosticCode

Stable condition identifier — see DiagnosticCode. Branch on this, not on the text.


detail? ​

readonly optional detail?: Readonly<Record<string, unknown>>

Structured context for the condition, when a site has any to give.

Every rejection of an ST_ enum value populates it: checkEnumOrWarn (ooxml/check-enum.ts) carries received — the value the caller passed — and valid, the whole legal list, plus whatever the call site adds. That reaches a handler for a line dash type, a table cell's 3-D preset and a table's horizontal overflow, among others. Nothing else populates it yet, so a handler must still treat the field as optional and must not assume a particular key is there for a given code.


message ​

readonly message: string

Human-readable explanation. Free to change in any release; do not parse it.