import { o as ErrorOptions } from "./types-B82IuY7M.mjs"; //#region src/error.d.ts /** * Structured error with context for better debugging * * @example * ```ts * throw new MxllogError({ * message: 'Failed to sync repository', * status: 503, * why: 'GitHub API rate limit exceeded', * fix: 'Wait 1 hour or use a different token', * link: 'https://docs.github.com/en/rest/rate-limit', * cause: originalError, * }) * ``` */ declare class MxllogError extends Error { /** HTTP status code */ readonly status: number; readonly why?: string; readonly fix?: string; readonly link?: string; constructor(options: ErrorOptions | string); /** HTTP status text (alias for message) */ get statusText(): string; /** HTTP status code (alias for compatibility) */ get statusCode(): number; /** HTTP status message (alias for compatibility) */ get statusMessage(): string; /** Structured data for serialization */ get data(): { why?: string; fix?: string; link?: string; } | undefined; toString(): string; toJSON(): Record; } /** * Create a structured error with context for debugging and user-facing messages. * * @param options - Error message string or full options object * @returns MxllogError with HTTP metadata (`status`, `statusText`) and `data`; also includes `statusCode` and `statusMessage` for legacy compatibility * * @example * ```ts * // Simple error * throw createError('Something went wrong') * * // Structured error with context * throw createError({ * message: 'Payment failed', * status: 402, * why: 'Card declined by issuer', * fix: 'Try a different payment method', * link: 'https://docs.example.com/payments', * }) * ``` */ declare function createError(options: ErrorOptions | string): MxllogError; //#endregion export { createError as n, MxllogError as t }; //# sourceMappingURL=error-D4JQHcSq.d.mts.map