import type { TypeCheckError } from "./types.js"; export type Suppressions = { /** True when `// @tc-nocheck` appears in the file's leading directive * region — silences all typecheck errors for the file. */ nocheck: boolean; /** 0-indexed line numbers (the parser's `SourceLocation.line` convention) * mapped to what a `// @tc-ignore` directive on the PREVIOUS line * suppresses there: `"all"` for a bare directive (or one followed only by * prose), or the specific `AG####` codes it names. An empty code list * means a malformed code attempt — suppress nothing (fail closed). */ ignoreLines: Record; }; /** * Scan source text for typecheck-suppression directives: * * // @tc-nocheck — must appear in the file's leading directive * region (only blank lines and other `//` * comments before it); suppresses every * typecheck error in the file. * * // @tc-ignore — suppresses every typecheck error on the next * line. * * // @tc-ignore AG2001 — suppresses only the named diagnostic codes on * the next line (comma- or space-separated). * * Only `//`-style comments are recognized. Trailing comments on a line of * code do *not* count, matching TypeScript's `@ts-ignore` semantics. */ export declare function parseSuppressions(source: string): Suppressions; /** * Drop errors covered by `suppressions`. Both `error.loc.line` and the keys * in `ignoreLines` are 0-indexed in the user's source. File-level * diagnostics (`loc: null`) are never line-suppressible — only * `@tc-nocheck` reaches them. */ export declare function applySuppressions(errors: TypeCheckError[], suppressions: Suppressions): TypeCheckError[];