import type { FormatId } from '../api/format-contract.js'; import { type SourceRule } from './rules.js'; import { type SourceLocalReason } from './scanners.js'; export type SourceStatus = 'rewritten' | 'compliant' | 'violation' | 'uncertifiable' | 'unguarded' | 'unrewritable' | 'local' | 'unmatched'; export interface SourceResultItem { readonly status: SourceStatus; readonly rule: SourceRule; readonly format: FormatId; readonly key?: string; readonly packageName?: string; readonly locator?: string; readonly rewrittenLocator?: string; readonly guarantee?: 'bytes' | 'commit'; readonly localReason?: SourceLocalReason; } export type SourceCounts = Readonly>; export interface SourceOperationOptions { readonly format?: FormatId; readonly allowEmptyRules?: boolean; } export interface OverrideSourceResult { readonly ok: boolean; readonly format: FormatId; readonly output: string; readonly items: readonly SourceResultItem[]; readonly counts: SourceCounts; } export interface AssertSourceResult { readonly ok: boolean; readonly format: FormatId; readonly items: readonly SourceResultItem[]; readonly counts: SourceCounts; } export declare function overrideSource(input: string, rulesInput: string | SourceRule | readonly (string | SourceRule)[], options?: SourceOperationOptions): OverrideSourceResult; export declare function assertSource(input: string, rulesInput: string | SourceRule | readonly (string | SourceRule)[], options?: SourceOperationOptions): AssertSourceResult;