/** * Domain-specific error types thrown by the SDK. * * Each class extends the native {@link Error} and sets its own `name` so that * consumers can branch on `error.name` or `instanceof` checks without having * to parse the message string. The constructor signatures intentionally mirror * the built-in `Error`, which keeps them interchangeable with code that * already accepts an `Error`. */ /** * Base class for every error thrown by the SDK. * * Centralising the boilerplate (name, prototype chain, stack capture) keeps * the individual subclasses small and guarantees consistent behaviour across * runtimes — Node, browsers, and older transpilers that drop the prototype * chain when extending built-ins. */ declare class QuranSdkError extends Error { constructor(message: string); } /** Thrown when a caller passes a language code outside {@link ALLOWED_LANGUAGES}. */ export declare class LanguageValidationError extends QuranSdkError { } /** Thrown for invalid arguments to any of the audio-recitation endpoints. */ export declare class AudioError extends QuranSdkError { } /** Thrown for invalid arguments to any of the chapter endpoints. */ export declare class ChapterError extends QuranSdkError { } /** Thrown for invalid arguments to any of the resource endpoints. */ export declare class ResourceError extends QuranSdkError { } /** Thrown for invalid arguments to any of the verse endpoints. */ export declare class VerseError extends QuranSdkError { } export {};