import { BaseError, ErrorContext } from './BaseError'; /** * Context information specific to Turndown conversion */ export interface TurndownErrorContext extends ErrorContext { /** The HTML content being converted */ html?: string; /** The partial markdown output (if conversion partially succeeded) */ markdown?: string; /** Turndown options that were used */ options?: Record; } /** * Error thrown when HTML to Markdown conversion fails */ export declare class TurndownError extends BaseError { /** * Create a new TurndownError * * @param message - Human-readable error message * @param context - Additional context information for debugging * @param cause - The original error that caused this error */ constructor(message: string, context?: TurndownErrorContext, cause?: Error); /** * Factory method to create a TurndownError for invalid HTML input * * @param html - The invalid HTML input (or its type if not a string) */ static invalidInput(html: unknown): TurndownError; /** * Factory method to create a TurndownError for conversion failures * * @param html - The HTML that failed to convert * @param options - The Turndown options that were used * @param cause - The original error (if any) */ static conversionFailed(html: string, options?: Record, cause?: Error): TurndownError; /** * Factory method to create a TurndownError for rule application failures * * @param ruleName - The name of the rule that failed * @param html - The HTML being processed when the rule failed * @param cause - The original error (if any) */ static ruleApplicationFailed(ruleName: string, html: string, cause?: Error): TurndownError; }