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
readonlycode:AnyAstmWarningCode
The existing, non-safety-critical warning code this profile expects.
match?
readonlyoptionalmatch?:AstmQuirkMatch
Optional structural narrowing (record type / field index).
rationale
readonlyrationale:string
Why the profile expects this deviation - grounded in its provenance.