import { DataProcessor } from "./data-processor.js"; import { Source } from "./source.js"; export type Diagnostic = { type: "missingTranslations" | "outdatedTranslations" | "unknownTranslations" | "valueTypeMismatch"; sourceId: string; fragmentId: string; locales: string[]; } | { type: "pluralFormCountMismatch"; sourceId: string; fragmentId: string; locale: string; actualFormCount: number; expectedFormCount: number; } | { type: "duplicateFragment"; sourceIds: string[]; fragmentId: string; } | { type: "unsupportedSource"; sourceId: string; } | { type: "unsupportedLocales"; locales: string[]; } | { type: "projectOutOfSync"; }; export type DiagnosticType = Diagnostic["type"]; export declare const diagnosticTypes: Set<"missingTranslations" | "outdatedTranslations" | "unknownTranslations" | "valueTypeMismatch" | "pluralFormCountMismatch" | "duplicateFragment" | "unsupportedSource" | "unsupportedLocales" | "projectOutOfSync">; export type DiagnosticSeverity = "error" | "warning" | "info" | "ignore"; export type DiagnosticSeverityConfig = { "*"?: DiagnosticSeverity; } & { [type in DiagnosticType]?: DiagnosticSeverity; }; export declare function getDiagnosticSeverity(config: DiagnosticSeverityConfig, type: DiagnosticType): DiagnosticSeverity; export type DiagnosticLocation = FileDiagnosticLocation | FragmentDiagnosticLocation; export interface FileDiagnosticLocation { type: "file"; sourceId: string; filename: string; source?: Source; } export interface FragmentDiagnosticLocation { type: "fragment"; sourceId: string; filename: string; source: Source; start: number; end: number; } export declare function getDiagnosticLocations(rootDir: string, dataProcessor: DataProcessor, diagnostic: Diagnostic): DiagnosticLocation[]; export declare function getDiagnosticMessage(diagnostic: Diagnostic): string;