import { default as Compiler } from '../../compiler'; import { Filepath } from '../../core/types/filepath'; import { MarkerData } from '../types'; export interface DiagnosticQuickFix { title: string; shortTitle?: string; edits: { start: number; end: number; newText: string; }[]; isPreferred?: boolean; } export interface Diagnostic { type: 'error' | 'warning' | 'info'; text: string; startRow: number; startColumn: number; endRow: number; endColumn: number; code?: string | number; category?: string; explanation?: string; filepath: Filepath; quickFixes?: DiagnosticQuickFix[]; } export default class DBMLDiagnosticsProvider { private compiler; constructor(compiler: Compiler); /** * Get all diagnostics (errors and warnings) from the current compilation */ provideDiagnostics(filepath?: Filepath): Diagnostic[]; /** * Get only errors from the current compilation */ provideErrors(filepath?: Filepath): Diagnostic[]; /** * Get only warnings from the current compilation */ provideWarnings(filepath?: Filepath): Diagnostic[]; /** * Get only infos from the current compilation */ provideInfos(filepath?: Filepath): Diagnostic[]; /** * Convert Monaco markers format (for editor integration) */ provideMarkers(filepath: Filepath): MarkerData[]; private createDiagnostic; private getSeverityValue; }