Skip to main content
Version: v0.0.4

Interface: AstmQuirkTolerance

One expected deviation declared by a profile. code names an existing, non-safety-critical warning code the profile expects; rationale documents why (grounded in the profile's AstmProfileProvenance); optional match narrows it to a structural location. defineAstmProfile throws if code is safety-critical or is not a real warning code, or if rationale is empty.

Example

import type { AstmQuirkTolerance } from "@cosyte/astm";
const t: AstmQuirkTolerance = {
code: "ASTM_UNKNOWN_ESCAPE_SEQUENCE",
rationale: "Corpus stacks that treat '&' as literal data emit non-standard escape bodies.",
};

Properties

code

readonly code: AnyAstmWarningCode

The existing, non-safety-critical warning code this profile expects.


match?

readonly optional match?: AstmQuirkMatch

Optional structural narrowing (record type / field index).


rationale

readonly rationale: string

Why the profile expects this deviation - grounded in its provenance.