import type { LocationEdge } from '@markdoc/markdoc';
import type { MARKDOC_ERROR_TYPES } from '../constants/common.js';
export type ErrorSeverity = 'PANIC' | 'ERROR';
export type CommonError = {
    severity: ErrorSeverity;
    type: 'ERROR';
    message: string;
    codeframe?: string | undefined;
    sourceFileRelativePath?: string;
    sourceFileLocation?: {
        line: number;
        character?: number;
    };
} | {
    type: 'BROKEN_LINK';
    brokenLinkType: 'LINK' | 'IMAGE';
    title: string;
    link: string;
    rawLink: string;
    message: string;
    sourceFileRelativePath: string;
    codeframe?: string;
    sourceFileLocation: {
        line: number;
        character?: number;
    };
};
export type MarkdocError = {
    message: string;
    codeframe?: string;
    type: ErrorType;
    brokenLinkType?: BrokenLinkType;
    sourceFileRelativePath: string;
    sourceFileLocation: LocationEdge;
} & ({
    type: 'BROKEN_LINK';
    link: string;
    rawLink: string;
    title: string;
} | {
    type: 'MARKDOC';
} | {
    type: 'RESOLVE';
    rawLink: string;
});
export type PageRenderError = {
    message: string;
    sourceFileRelativePath: string;
    codeframe?: never;
    sourceFileLocation?: never;
};
export type BrokenLinkType = 'LINK' | 'IMAGE';
type ErrorType = (typeof MARKDOC_ERROR_TYPES)[number];
export {};
//# sourceMappingURL=errors.d.ts.map