import { TagLibError } from "./base.js"; export declare function errorMessage(error: unknown): string; /** * Error thrown when the Wasm module fails to initialize */ export declare class TagLibInitializationError extends TagLibError { /** * Creates a new TagLibInitializationError * @param message - Description of the initialization failure * @param details - Additional context about the error */ constructor(message: string, details?: Record); } /** * Error thrown when an audio file format is invalid or corrupted */ export declare class InvalidFormatError extends TagLibError { readonly bufferSize?: number | undefined; /** * Creates a new InvalidFormatError * @param message - Description of the format error * @param bufferSize - Size of the audio buffer in bytes * @param details - Additional context about the error */ constructor(message: string, bufferSize?: number | undefined, details?: Record); } /** * Error thrown when an audio format is recognized but not supported */ export declare class UnsupportedFormatError extends TagLibError { readonly format: string; readonly supportedFormats: readonly string[]; /** * Creates a new UnsupportedFormatError * @param format - The unsupported format that was encountered * @param supportedFormats - List of formats that are supported * @param details - Additional context about the error */ constructor(format: string, supportedFormats?: readonly string[], details?: Record); } /** * Error thrown during file operations (read, write, save) */ export declare class FileOperationError extends TagLibError { readonly operation: "read" | "write" | "save" | "stat"; readonly path?: string | undefined; /** * Creates a new FileOperationError * @param operation - The file operation that failed * @param message - Description of the failure * @param path - File path involved in the operation * @param details - Additional context about the error */ constructor(operation: "read" | "write" | "save" | "stat", message: string, path?: string | undefined, details?: Record); } /** * Error thrown when metadata operations fail */ export declare class MetadataError extends TagLibError { readonly operation: "read" | "write"; readonly field?: string | undefined; /** * Creates a new MetadataError * @param operation - The metadata operation that failed * @param message - Description of the failure * @param field - The metadata field involved * @param details - Additional context about the error */ constructor(operation: "read" | "write", message: string, field?: string | undefined, details?: Record); } /** * Error thrown when Wasm memory operations fail */ export declare class MemoryError extends TagLibError { /** * Creates a new MemoryError * @param message - Description of the memory failure * @param details - Additional context about the error */ constructor(message: string, details?: Record); } /** * Error thrown when the environment doesn't support required features */ export declare class EnvironmentError extends TagLibError { readonly environment: string; readonly reason: string; readonly requiredFeature?: string | undefined; /** * Creates a new EnvironmentError * @param environment - The runtime environment name * @param reason - Why the environment is incompatible * @param requiredFeature - The feature that is missing */ constructor(environment: string, reason: string, requiredFeature?: string | undefined); } //# sourceMappingURL=classes.d.ts.map