On this page
Check framework core: sealed outcomes, reporters, definitions, checks.toml parsing, and the registration/double-entry machinery.
#typescript/src/checks/framework
#typescript/src/checks/framework
Check framework core: sealed outcomes, reporters, definitions, checks.toml parsing, and the registration/double-entry machinery.
Parity sources: go/strictcli/check.go (structure and templates) with python/strictcli/__init__.py (~1145-1283, ~2312-2600, ~3025-3100) as the divergence ground truth. The scope field is PARSE-ONLY (matching Go): it is carried on definitions and emitted in schema/list output, but never consulted at run time -- there is no scope adapter and no SkipCheck in TS.
#CheckContext
export interface CheckContextMinimal interface that tool-specific check contexts must satisfy.
#CheckSeverity
export type CheckSeverity = "error" | "warn"Check severity level: "error" causes hard failures, "warn" is non-fatal unless --ignore-warnings is absent.
#CheckProblem
export interface CheckProblemA single minted finding: text plus severity ("error" or "warn").
#CheckOutcome
export class CheckOutcomeThe ceiling-typed result of a check implementation. Sealed by construction: a valid outcome is obtained ONLY through reporter methods (passed/skipped/found) or the runner's internal skip mint, both of which pass the module-private mint token. Direct construction throws.
#mintSkip
export function mintSkip(message: string): CheckOutcomeRunner-internal mint for cascade-skip outcomes (not part of the public API).
#orderedProblems
export function orderedProblems(o: CheckOutcome): readonly CheckProblem[]Problems grouped by severity: all error-severity problems first, then all warn-severity problems. Insertion order is preserved within each group.
#deriveStatus
export function deriveStatus(o: CheckOutcome): CheckStatusMaps a minted CheckOutcome to a display/verdict label. found + any error-severity problem => "fail"; found + only warns => "warn"; passed => "pass"; skipped => "skip".
#CheckStatus
export type CheckStatus = "pass" | "fail" | "warn" | "skip"Derived check verdict label: "pass", "fail", "warn", or "skip".
#WarnReporter
export class WarnReporter extends ReporterCoreReporter handed to warn-severity check impls. It can mint warn-severity problems and terminal outcomes but structurally LACKS error-minting: there is no error method in its surface, so a warn check cannot produce an error-severity problem and can never cascade.
#ErrorReporter
export class ErrorReporter extends ReporterCoreReporter handed to error-severity check impls. Everything WarnReporter has PLUS error() (mints an error-severity problem).
#CheckRunResult
export class CheckRunResultA named check outcome returned by app.runChecks(). The verdict is derived from the minted outcome; the runner's exit/cascade logic and the formatters all consume these same accessors (one source of truth).
#CheckImpl
export type CheckImpl = (A check impl wrapped with its reporter, installed at registration time.
#CheckDef
export interface CheckDefInternal definition of a single check loaded from checks.toml.
#ChecksState
export interface ChecksStatePer-app check-system state, held by AppImpl.
#newChecksState
export function newChecksState(): ChecksState#addCheckDef
export function addCheckDef(state: ChecksState, def: CheckDef): voidSingle internal insertion point for check definitions. Rejects duplicate names as a hard error. TOML loading and provider materialization both route through here.
#sortedCheckNames
export function sortedCheckNames(state: ChecksState): string[]Check names in sorted order, for deterministic listing.
#registerCheckImpl
export function registerCheckImpl(Single registration chokepoint shared by app.errorCheck and app.warnCheck. Enforces the double-entry contract (declared vs registered) and cross-checks the registration FORM against the TOML-declared severity so that app.errorCheck on a severity="warn" definition is a hard error.
#validateCheckRegistrations
export function validateCheckRegistrations(Validates that all declared checks have registered implementations. Returns an error message listing unregistered checks, or undefined. (Inline string in both siblings, so it stays inline here too.)
#CHECK_IDENTIFIER_RE
export const CHECK_IDENTIFIER_RE = /^[a-z][a-z0-9-]*$/Validates identifier names (check names, tag names).
#ParsedChecksToml
export interface ParsedChecksToml#parseChecksToml
export function parseChecksToml(text: string): ParsedChecksTomlParses and validates checks TOML text, returning the app name, validated check definitions, and names in declaration order. Throws RegistrationError (the ValueError analog) on any schema violation or invalid TOML. Validation order follows Python (_parse_checks_toml).