import { CustomPayload } from 'vite';
import { SourceLocation } from '@babel/code-frame';
import { DiagnosticToRuntime, DiagnosticLevel } from './types';
import type { Range } from 'vscode-languageclient';
import type { ESLint } from 'eslint';
import type { Diagnostic as LspDiagnostic, PublishDiagnosticsParams } from 'vscode-languageclient/node';
import type { Diagnostic as TsDiagnostic, LineAndCharacter } from 'typescript';
export interface NormalizedDiagnostic {
    /** error message */
    message?: string;
    /** error conclusion */
    conclusion?: string;
    /** error stack */
    stack?: string | string[];
    /** file name */
    id?: string;
    /** checker diagnostic source */
    checker: string;
    /** raw code frame generated by @babel/code-frame */
    codeFrame?: string;
    /** code frame, but striped */
    stripedCodeFrame?: string;
    /** error code location */
    loc?: SourceLocation;
    /** error level */
    level?: DiagnosticLevel;
}
export declare function filterLogLevel(diagnostics: NormalizedDiagnostic, level?: DiagnosticLevel[]): NormalizedDiagnostic | null;
export declare function filterLogLevel(diagnostics: NormalizedDiagnostic[], level?: DiagnosticLevel[]): NormalizedDiagnostic[];
export declare function diagnosticToTerminalLog(d: NormalizedDiagnostic, name?: 'TypeScript' | 'vue-tsc' | 'VLS' | 'ESLint'): string;
export declare function diagnosticToRuntimeError(d: NormalizedDiagnostic): DiagnosticToRuntime;
export declare function diagnosticToRuntimeError(d: NormalizedDiagnostic[]): DiagnosticToRuntime[];
export declare function toViteCustomPayload(id: string, diagnostics: DiagnosticToRuntime[]): CustomPayload;
export declare function createFrame({ source, location, }: {
    /** file source code */
    source: string;
    location: SourceLocation;
}): string;
export declare function tsLocationToBabelLocation(tsLoc: Record<'start' | 'end', LineAndCharacter /** 0-based */>): SourceLocation;
export declare function wrapCheckerSummary(checkerName: string, rawSummary: string): string;
export declare function composeCheckerSummary(checkerName: string, errorCount: number, warningCount: number): string;
export declare function normalizeTsDiagnostic(d: TsDiagnostic): NormalizedDiagnostic;
export declare function normalizeLspDiagnostic({ diagnostic, absFilePath, fileText, }: {
    diagnostic: LspDiagnostic;
    absFilePath: string;
    fileText: string;
}): NormalizedDiagnostic;
export declare function normalizePublishDiagnosticParams(publishDiagnostics: PublishDiagnosticsParams): Promise<NormalizedDiagnostic[]>;
export declare function uriToAbsPath(documentUri: string): string;
export declare function lspRange2Location(range: Range): SourceLocation;
export declare function normalizeVueTscDiagnostic(d: TsDiagnostic): NormalizedDiagnostic;
export declare function normalizeEslintDiagnostic(diagnostic: ESLint.LintResult): NormalizedDiagnostic[];
export declare function ensureCall(callback: CallableFunction): void;
export declare function consoleLog(value: string): void;
//# sourceMappingURL=logger.d.ts.map