Type Alias: SerializeErrorCode
SerializeErrorCode = typeof
SERIALIZE_ERROR_CODES[keyof typeofSERIALIZE_ERROR_CODES]
Discriminant for DicomSerializeError.code, enabling exhaustive
switch narrowing (the switch-exhaustiveness-check lint rule).
Example
import type { SerializeErrorCode } from "@cosyte/dicom";
function describe(code: SerializeErrorCode): string {
switch (code) {
case "MISSING_TRANSFER_SYNTAX":
return "dataset has no Transfer Syntax UID to serialize under";
case "UNSUPPORTED_TRANSFER_SYNTAX":
return "Transfer Syntax UID is outside the v1 set";
}
}