Skip to main content
Version: v0.0.6

Variable: TOLERABLE_CODES

const TOLERABLE_CODES: ReadonlySet<AnyAstmWarningCode>

The only warning codes a profile may list in its tolerate set: benign, structural/syntactic vendor noise that cannot alter, drop, or fabricate an extracted value. Frozen so it cannot be mutated at runtime to smuggle a code in. Adding to this set is a deliberate, reviewable act (and each addition must be an expected: false non-safety code by the same reasoning as the four here).

Example

import { TOLERABLE_CODES } from "@cosyte/astm";
TOLERABLE_CODES.has("ASTM_UNKNOWN_ESCAPE_SEQUENCE"); // true
TOLERABLE_CODES.has("ASTM_FRAME_BAD_CHECKSUM"); // false