import { Commands } from '../commands/commands'; import { DiagnosticLevel } from './configOptions'; import { Range, TextRange } from './textRange'; import { Uri } from './uri/uri'; export declare const defaultMaxDiagnosticDepth = 5; export declare const defaultMaxDiagnosticLineCount = 8; export declare enum TaskListPriority { High = "High", Normal = "Normal", Low = "Low" } export interface TaskListToken { text: string; priority: TaskListPriority; } export declare const enum DiagnosticCategory { Error = 0, Warning = 1, Information = 2, UnusedCode = 3, UnreachableCode = 4, Deprecated = 5, TaskItem = 6 } export declare function convertLevelToCategory(level: DiagnosticLevel): DiagnosticCategory.Error | DiagnosticCategory.Warning | DiagnosticCategory.Information; export interface DiagnosticAction { action: string; } export interface DiagnosticWithinFile { uri: Uri; diagnostic: Diagnostic; } export interface CreateTypeStubFileAction extends DiagnosticAction { action: Commands.createTypeStub; moduleName: string; } export interface DiagnosticRelatedInfo { message: string; uri: Uri; range: Range; priority: TaskListPriority; } export declare namespace DiagnosticRelatedInfo { function toJsonObj(info: DiagnosticRelatedInfo): any; function fromJsonObj(obj: any): DiagnosticRelatedInfo; } export declare class Diagnostic { readonly category: DiagnosticCategory; readonly message: string; readonly range: Range; readonly priority: TaskListPriority; private _actions; private _rule; private _relatedInfo; private _data; constructor(category: DiagnosticCategory, message: string, range: Range, priority?: TaskListPriority); toJsonObj(): { category: DiagnosticCategory; message: string; range: Range; priority: TaskListPriority; actions: DiagnosticAction[] | undefined; rule: string | undefined; data: any; relatedInfo: any[]; }; static fromJsonObj(obj: any): Diagnostic; addAction(action: DiagnosticAction): void; setData(data: any): void; getData(): any | null; getActions(): DiagnosticAction[] | undefined; setRule(rule: string): void; getRule(): string | undefined; addRelatedInfo(message: string, fileUri: Uri, range: Range, priority?: TaskListPriority): void; getRelatedInfo(): DiagnosticRelatedInfo[]; } export declare function compareDiagnostics(d1: Diagnostic, d2: Diagnostic): 1 | -1 | 0; export declare class DiagnosticAddendum { private _messages; private _childAddenda; private _nestLevel; private _range; addMessage(message: string): void; addMessageMultiline(message: string): void; addTextRange(range: TextRange): void; createAddendum(): DiagnosticAddendum; getString(maxDepth?: number, maxLineCount?: number): string; isEmpty(): boolean; addAddendum(addendum: DiagnosticAddendum): void; getChildren(): DiagnosticAddendum[]; getMessages(): string[]; getNestLevel(): number; getEffectiveTextRange(): TextRange | undefined; private _getTextRangeRecursive; private _getMessageCount; private _getLinesRecursive; }