import { DiagnosticLevel } from './configOptions'; import { Diagnostic, DiagnosticAction } from './diagnostic'; import { Range, TextRange } from './textRange'; import { TextRangeCollection } from './textRangeCollection'; import { Uri } from './uri/uri'; export interface FileDiagnostics { fileUri: Uri; version: number | undefined; diagnostics: Diagnostic[]; } export declare namespace FileDiagnostics { function toJsonObj(fileDiag: FileDiagnostics): any; function fromJsonObj(fileDiagObj: any): FileDiagnostics; } export declare class DiagnosticSink { private _diagnosticList; private _diagnosticMap; constructor(diagnostics?: Diagnostic[]); fetchAndClear(): Diagnostic[]; addError(message: string, range: Range): Diagnostic; addWarning(message: string, range: Range): Diagnostic; addInformation(message: string, range: Range): Diagnostic; addUnusedCode(message: string, range: Range, action?: DiagnosticAction): Diagnostic; addUnreachableCode(message: string, range: Range, action?: DiagnosticAction): Diagnostic; addDeprecated(message: string, range: Range, action?: DiagnosticAction): Diagnostic; addDiagnostic(diag: Diagnostic): Diagnostic; addDiagnostics(diagsToAdd: Diagnostic[]): void; getErrors(): Diagnostic[]; getWarnings(): Diagnostic[]; getInformation(): Diagnostic[]; getUnusedCode(): Diagnostic[]; getUnreachableCode(): Diagnostic[]; getDeprecated(): Diagnostic[]; } export declare class TextRangeDiagnosticSink extends DiagnosticSink { private _lines; constructor(lines: TextRangeCollection, diagnostics?: Diagnostic[]); addDiagnosticWithTextRange(level: DiagnosticLevel, message: string, range: TextRange): Diagnostic; addUnusedCodeWithTextRange(message: string, range: TextRange, action?: DiagnosticAction): Diagnostic; addUnreachableCodeWithTextRange(message: string, range: TextRange, action?: DiagnosticAction): Diagnostic; addDeprecatedWithTextRange(message: string, range: TextRange, action?: DiagnosticAction): Diagnostic; }